public DataSet SelectSQLiteSrvRows(DataSet myDataSet,string sqConnection,string mySelectQuery,string myTableName)
{
SQLiteConnection myConn = new SQLiteConnection(sqConnection);
SQLiteDataAdapter myDataAdapter = new SQLiteDataAdapter();
myDataAdapter.SelectCommand = new SQLiteCommand(mySelectQuery, myConn);
SQLiteCommandBuilder sqCommandBuilder = new SQLiteCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the SQLiteCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}