Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Form1_Load(object sender, EventArgs e)
- {
- // Create Connection
- string SQLLocation = Path.GetDirectoryName(Application.ExecutablePath) + "\\Data.bin";
- string ConnString = string.Format("Data Source={0};Compress=True;", SQLLocation);
- SQLiteConnection myConnection = new SQLiteConnection(ConnString);
- DataSet ds = new DataSet();
- string sql = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;";
- SQLiteConnection conn = new SQLiteConnection(ConnString);
- SQLiteDataAdapter da = new SQLiteDataAdapter(sql, conn);
- da.Fill(ds);
- dataGridView1.DataSource = ds.Tables[0].DefaultView;
- }
Add Comment
Please, Sign In to add comment