GetProviderSpecificValues Method
Gets all column values for the current row. If possible, a provider-specific type is used.
public override int GetProviderSpecificValues(
object[]
)
'Declaration
Public Overrides Function GetProviderSpecificValues( _
ByVal () As Object _
) As Integer
Parameters
- values
- An array of System.Object into which to copy the column values.
Return Value
The number of instances of
System.Object in the array.
static void GetMyValues(SugarConnection myConnection) {
SugarCommand cmd = new SugarCommand("SELECT * FROM Campaigns");
cmd.Connection = myConnection;
myConnection.Open();
try
{
SugarDataReader reader = cmd.ExecuteReader();
reader.Read();
object[] someValues = new object[5];
int number = reader.GetProviderSpecificValues(someValues);
for (short i = 0; i < number; i++)
{
Console.WriteLine(someValues[i].ToString());
}
reader.Close();
}
finally
{
myConnection.Close();
}
}
Shared Sub GetMyValues(ByVal myConnection As SugarConnection)
Dim cmd As New SugarCommand("SELECT * FROM Campaigns")
cmd.Connection = myConnection
myConnection.Open()
Try
Dim reader As SugarDataReader = cmd.ExecuteReader
reader.Read()
Dim someValues As Object() = New Object() {}
Dim number As Integer = reader.GetProviderSpecificValues(someValues)
For i As Short = 0 To number - 1
Console.WriteLine(someValues(i).ToString)
Next i
reader.Close()
Finally
myConnection.Close()
End Try
End Sub