I want to open a .data file. I use SQLite Studio. The file is opened normally.
But if you try to print data into DataGrid in the WInForms application, but it crashes out that it's not a database file
string connString = @"Data Source=AdLoc.data; Version=3";
const string query = "SELECT * FROM Person";
DataSet ds = new DataSet();
SQLiteConnection connection = new SQLiteConnection(connString);
SQLiteCommand command = new SQLiteCommand(query, connection);
connection.Open();
using (SQLiteDataAdapter adapter = new SQLiteDataAdapter(command))
{
adapter.Fill(ds);
}
dataGridView1.DataSource = ds.Tables[0];