I try to add/edit records in a DataGridView in VB.Net. The addition/modification performed at DGV, and also at the database. However, when I close the application and I recover, my additions/modifications are not saved, I found my old data.
Here is my code
Code:
cmdInsert.CommandType = CommandType.Text
cmdInsert.CommandText = "insert into File values('" & txtcod.Text & "','" & txtno.Text & "','" & txtfoct.Text & "', '" & Txtbas.Text & "' )"
cmdInsert.Connection() = myConnection
cmdInsert.ExecuteNonQuery()
cnx.Close()
MessageBox.show("Listing added correctly")
Bookmarks