private void readAllRecords() { try { var datatable = new DataTable(); myConnection.Open(); string commandText = "Select * From Albums"; SQLiteDataAdapter mySqliteDataAdapter = new SQLiteDataAdapter(commandText, myConnection); mySqliteDataAdapter.Fill(datatable); myConnection.Close(); dataGridView.DataSource = datatable; }
myCommand.ExecuteNonQuery(); myConnection.Close(); //MessageBox.Show("Your record has been deleted."); txtArtistName.Text = " Artist Name"; txtAlbumTitle.Text = " Album Title"; txtYear.Text = " Year"; cmbxGenre.Text = " Genre"; cmbxMedium.Text = " Medium"; btnSave.Enabled = false; readAllRecords(); }
catch (Exception) {