Hi i am using dataset inside a session and using dataadapter.update method to update in database this is working fine when i am inserting rows in this dataset and updating it but when i am deleting row by using this method it is updating in dataset but not updating in similar thing is working in another form very fine. i am explaining it again.there are two button insert and update. Public Sub Connect To Access() Dim Error Number As Integer Dim conn As New System. Ole Db Data Adapter Dim my Select Query As String = "SELECT Carrier ID, Name FROM tbl Carrier" 'Dim my Command As New System. Data Member = "trial1" End Sub Private Sub Button1_Click(By Val sender As System. Odbc Command Builder(adp) Dim i As Integer Try i = adp. Click 'Update records using a Command Builder ' The variable i gives the number of records updated Dim cmdbuilder As New Odbc. ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified what is that? Odbc Connection("Driver=; Server=localhost; Database=shreyas; User=root; Password=;") Dim cmd As Odbc. Odbc Data Adapter Dim ds As New Data Set Private Sub Form1_Form Closing(By Val sender As Object, By Val e As System.
Instead, a better approach is to connect to the database, fetch the data into a and make any changes required.
The code compiles and runs with out error - but when I check the My Sql DB to see the updates, there is nothing there.
My code is as follows: At present it seems that you are looking at the debug line by line rather than to test that the line has commited / completed successfully.
I would also advise that you break out the query into a seperate code file and remove the try/catch block. I suppose you want to want to use the Datatable table that you get from the function's parameters (from Access) and use it to update the same table in My Sql, rigth? The code compiles and runs with out error - but when I check the My Sql DB to see the updates, there is nothing there.
That way you can test that it is in fact the code which is the issue or other code affecting it and additionally any error messages that the try/catch block 'absorbs' will be displayed on the webpage / debugger automatically.