I want to query some data using
DataTable dt = null;
SQLiteCommand mycommand = new SQLiteCommand(cnn);
mycommand.CommandText = sql;
SQLiteDataReader reader = mycommand.ExecuteReader();
dt.Load(reader);
the Dataset of DataTable returns null but row count > 0 i.e. dt.dataset is null but dt.rows >0 . What should i do to get a filled dataset?
Thank you for your time.
Ferda
Your code is only loading a DataTable, not a complete DataSet. I would change your code a bit so that you’re using a DataAdapter to fill the DataSet: