Save changes to a database

[b]Hi ,
This is my codes , what I want to do is to save changes to database. [/b]

[color=Blue] Dim connstr As String = "Provider= Microsoft.Jet.OLEDB.4.0;" & _
"Data source = cdbank.mdb"

Dim dt As New DataTable
Dim sqlstr As String = "SELECT * FROM info"

Private Sub SaveToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem1.Click
Dim changes As Integer

Dim dataadapter As New OleDb.OleDbDataAdapter(sqlstr, connstr)
Dim commandbuilder As New OleDb.OleDbCommandBuilder(dataadapter)
If changes > 0 Then
MsgBox(changes & "changed rows were stored in the database ")
MsgBox("No changes made.")

End If
End Sub[/color]

But when i run the program and i load data from database and want to save the changes i have made i get this error:

Syntax error (missing operator) in query expression '((code = ?) AND ((? = 1 AND name IS NULL) OR (name = ?)) AND ((? = 1 AND serial IS NULL) OR (serial = ?)) AND ((? = 1 AND software inside IS NULL) OR (software inside = ?)))'.


I have no idea what this is about !

Anyone here can help
I mostly appreciate


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!