brandonyoung
Member
- Joined
- Apr 26, 2011
- Messages
- 12
- Programming Experience
- 3-5
If anyone can point out my error it would be much appreciated.
This is the error message: Syntax error in UPDATE statement.
Here's my code:
Thanks in Advance.....
This is the error message: Syntax error in UPDATE statement.
Here's my code:
Sub addSpot(ByRef row As Integer, ByRef col As Integer, ByRef value As String) Dim con As New OleDbConnection Dim dbProvider As String Dim dbSource As String Dim ds As New DataSet Dim da As OleDb.OleDbDataAdapter Dim sql As String dbProvider = ("PROVIDER=Microsoft.Jet.OLEDB.4.0;") dbSource = ("Data Source = C:/Day Nursery.mdb") con.ConnectionString = dbProvider & dbSource con.Open() sql = "SELECT * FROM Design" da = New OleDb.OleDbDataAdapter(sql, con) da.Fill(ds, "AddressBook") Dim cb As New OleDb.OleDbCommandBuilder(da) ds.Tables("AddressBook").Rows(row).Item(col) = value da.Update(ds, "AddressBook") MsgBox("Data updated") con.Close() End Sub
Thanks in Advance.....
Last edited by a moderator: