We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
The SQL command looks something like this:
Private Function storeData(ByVal mySql As String) As Boolean Dim ret As Boolean = False Dim ac As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & myPath) Try Using ac Dim myCommand = New System.Data.OleDb.OleDbCommand(mySql, ac) myCommand.Connection.Open() myCommand.ExecuteNonQuery() myCommand.Connection.Close() End Using ret = True Catch ex As Exception MsgBox("There is something wrong." & _ vbNewLine & ex.ToString, MsgBoxStyle.Exclamation, "SQL Error") End Try Return ret End Function
and seem to work fine, and when I browse through the table using my program after having entered a new record, I can see the new records. But when I close the program and reopens it, or query the DB from outside, the newly entered data have disappeared. What am I missing? Do I need som kind of file save or commit or something?
Insert into NAD(Name,Address,Postnumber,Telefonnumber,Epostaddress,Webpage) values('Thor','Oslo','0575','999 88 777','firstname.lastname@example.org','www.web.com');
Join the community of 500,000 technology professionals and ask your questions.