private SQLiteDataReader Load(string file, string query)
{
string str = string.Format(@"Data Source={0}\{1}.sqlite;", folderName, file);
connection = new SQLiteConnection(str);
try
{
connection.Open();
using (SQLiteCommand command = connection.CreateCommand())
{
command.CommandText = query;
reader = command.ExecuteReader();
return reader;
}
}
catch
{
reader.Close();
connection.Close();
return null;
}
}