| | |
Data Adapter Update Command
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
Hey, I face a problem in updating data to the original database.
Everytime when I clicked the update button. an error came out in the coding where I highlighted below, saying syntax error in update statement!
Can somebody please pin-point my mistake?
Everytime when I clicked the update button. an error came out in the coding where I highlighted below, saying syntax error in update statement!
Can somebody please pin-point my mistake?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.JigTableAdapter.Fill(Me.JigDataSet.jig)
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\jig.mdb"
con.Open()
sql = "SELECT * FROM jig"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "jig")
con.Close()
MaxRows = ds.Tables("jig").Rows.Count
inc = 0
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("jig").Rows(inc).Item(0) = JIG_NOTextBox.Text()
ds.Tables("jig").Rows(inc).Item(1) = JIG_NAMETextBox.Text()
ds.Tables("jig").Rows(inc).Item(2) = JIG_MODELTextBox.Text()
da.Update(ds, "jig")
MsgBox("Data updated!")
End Sub Last edited by Ancient Dragon; Jan 5th, 2009 at 3:33 pm. Reason: add code tags
![]() |
Similar Threads
- Visual C#: Inserting an Access Database Record (C#)
- Sending update commands directly (C#)
- update the db using values in a datagrid (VB.NET)
- How to update a database? (C#)
- SQLCommandBuilder is Dumb? (C#)
- Error connecting to database (ASP.NET)
- DVD+RW/+R Burning problems Update (Storage)
Other Threads in the VB.NET Forum
- Previous Thread: What ListBox properties do I set to...
- Next Thread: Problem with simple ComboBox
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





