'Declaration Public Overrides ReadOnly Property FieldCount As Integer
public override int FieldCount {get;}
'Declaration Public Overrides ReadOnly Property FieldCount As Integer
public override int FieldCount {get;}
public void FetchResults(ZohoBooksConnection ZohoBooksConnection) { ZohoBooksCommand cmd = new ZohoBooksCommand("SELECT * FROM Accounts"); cmd.FetchSize = 100; cmd.Connection = ZohoBooksConnection; ZohoBooksConnection.Open(); try { ZohoBooksDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { for (int i=0;i<reader.FieldCount;i++) { Console.Write("\t"+reader[i]); } Console.WriteLine(); } } finally { ZohoBooksConnection.Close(); } }
Public Sub FetchResults(ByVal ZohoBooksConnection As ZohoBooksConnection) Dim cmd As ZohoBooksCommand = New ZohoBooksCommand("SELECT * FROM Accounts") cmd.FetchSize = 100 cmd.Connection = ZohoBooksConnection ZohoBooksConnection.Open() Try Dim reader As ZohoBooksDataReader = cmd.ExecuteReader() While reader.Read() Dim i For i = 0 To reader.FieldCount - 1 Console.Write(String.Concat(" ", reader(i))) Next i Console.WriteLine() End While Finally ZohoBooksConnection.Close() End Try End Sub