'Declaration Public Overloads Shadows Function ExecuteReader() As SQLiteDataReader
public new SQLiteDataReader ExecuteReader()
Return Value
A SQLiteDataReader object.
'Declaration Public Overloads Shadows Function ExecuteReader() As SQLiteDataReader
public new SQLiteDataReader ExecuteReader()
public void CreateSQLiteDataReader(string mySelectQuery,string sqConnectionString) { SQLiteConnection sqConnection = new SQLiteConnection(sqConnectionString); SQLiteCommand sqCommand = new SQLiteCommand(mySelectQuery, sqConnection); sqCommand.Connection.Open(); SQLiteDataReader sqReader = sqCommand.ExecuteReader(); try { while(sqReader.Read()) { Console.WriteLine(sqReader.GetString(0)); } } finally { sqReader.Close(); sqConnection.Close(); } }
Public Sub CreateSQLiteDataReader(mySelectQuery As String, _ sqConnectionString As String) Dim sqConnection As New SQLiteConnection(sqConnectionString) Dim sqCommand As New SQLiteCommand(mySelectQuery, sqConnection) sqCommand.Connection.Open() Dim sqReader As SQLiteDataReader = sqCommand.ExecuteReader() Try While sqReader.Read() Console.WriteLine(sqReader.GetString(0)) End While Finally sqReader.Close() sqConnection.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