'Declaration Public Overloads Shadows Function ExecuteReader() As DynamicsDataReader
public new DynamicsDataReader ExecuteReader()
Return Value
A DynamicsDataReader object.
'Declaration Public Overloads Shadows Function ExecuteReader() As DynamicsDataReader
public new DynamicsDataReader ExecuteReader()
public void CreateDynamicsDataReader(string mySelectQuery,string dynamicsConnectionString) { DynamicsConnection dynamicsConnection = new DynamicsConnection(dynamicsConnectionString); DynamicsCommand dynamicsCommand = new DynamicsCommand(mySelectQuery, dynamicsConnection); dynamicsCommand.Connection.Open(); DynamicsDataReader dynamicsReader = dynamicsCommand.ExecuteReader(); try { while(dynamicsReader.Read()) { Console.WriteLine(dynamicsReader.GetString(0)); } } finally { dynamicsReader.Close(); dynamicsConnection.Close(); } }
Public Sub CreateDynamicsDataReader(mySelectQuery As String, _ dynamicsConnectionString As String) Dim dynamicsConnection As New DynamicsConnection(dynamicsConnectionString) Dim dynamicsCommand As New DynamicsCommand(mySelectQuery, dynamicsConnection) dynamicsCommand.Connection.Open() Dim dynamicsReader As DynamicsDataReader = dynamicsCommand.ExecuteReader() Try While dynamicsReader.Read() Console.WriteLine(dynamicsReader.GetString(0)) End While Finally dynamicsReader.Close() dynamicsConnection.Close() End Try End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2