'Declaration Public Overloads Shadows Function ExecuteReader() As OracleDataReader
public new OracleDataReader ExecuteReader()
Return Value
A OracleDataReader object.
'Declaration Public Overloads Shadows Function ExecuteReader() As OracleDataReader
public new OracleDataReader ExecuteReader()
public void CreateOracleDataReader(string mySelectQuery,string myConnectionString) { OracleConnection myConnection = new OracleConnection(myConnectionString); OracleCommand myCommand = new OracleCommand(mySelectQuery, myConnection); myCommand.Connection.Open(); OracleDataReader myReader = myCommand.ExecuteReader(); try { while(myReader.Read()) { Console.WriteLine(myReader.GetString(0)); } } finally { myReader.Close(); myConnection.Close(); } }
Public Sub CreateOracleDataReader(mySelectQuery As String, _ myConnectionString As String) Dim myConnection As New OracleConnection(myConnectionString) Dim myCommand As New OracleCommand(mySelectQuery, myConnection) myCommand.Connection.Open() Dim myReader As OracleDataReader = myCommand.ExecuteReader() Try While myReader.Read() Console.WriteLine(myReader.GetString(0)) End While Finally myReader.Close() myConnection.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