I'm trying to port an iOS application that uses native Sqlite3 and makes heavy use of SqliteDataReader
.
On the target platform I use SQLIte-Net (https://github.com/praeclarum/sqlite-net) and there the SqliteDataReader class does not exist.
What are my best options to convert this? The usage of the reader is always code like this:
SqliteConnection oConn = AppDelegateBase.MasterDatabase.CreateDBMSConnection();
using ( SqliteCommand oCmd = new SqliteCommand ( "SELECT * FROM ATable"), oConn ) )
using ( var oReader = oCmd.ExecuteReader ( ) )
{
while ( oReader.Read ( ) )
{
int val = Convert.ToInt32(oReader["someColumn"]);
}
oReader.Close ();
}
oReader
is yourIDbDataReader
object. Better use the ADO.NET version posted by tHand – Snailfish