Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void LoadingData()
- {
- this.makeConnection();
- Console.WriteLine("\nBegin loading data...");
- try
- {
- OleDbCommand command = new OleDbCommand("SELECT * FROM TablePerson", connection);
- OleDbDataAdapter adapter = new OleDbDataAdapter(command);
- DataTable table = new DataTable();
- adapter.Fill(table);
- dataGridView1.DataSource = table;
- Console.WriteLine("Success loading data...");
- this.closeConnection();
- }
- catch (Exception ex)
- {
- Console.WriteLine("Failed to load data :: " + ex.Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment