| | |
Help with Dataset update
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2006
Posts: 3
Reputation:
Solved Threads: 0
I have a mdb file and I access it through ADO.NET, from time to time I have to update an existing record, so I do this:
But I get a "Syntax error in Update statement" the moment it steps out of daDataGen.Update(dsDataGen, "general") , I really dont know why. Please help http://www.vbforums.com/images/smilies/frown.gif
VB.NET Syntax (Toggle Plain Text)
Dim dsDataGen As New DataSet Dim daDataGen As OleDbDataAdapter Dim cbDataGen As OleDbCommandBuilder Private Sub Data_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load daDataGen = New OleDbDataAdapter("SELECT * FROM [mytable]", strConnConfig) daDataGen.MissingSchemaAction = MissingSchemaAction.AddWithKey daDataGen.Fill(dsDataGen, "general") cbDataGen = New OleDbCommandBuilder(daDataGen) End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Try If dsDataGen Is Nothing Then Return With dsDataGen.Tables("general") .Rows(0)("name_e") = txt_nombre.Text .Rows(0)("add_e") = txt_address.Text .Rows(0)("phone_e") = txt_phone.Text .Rows(0)("email_e") = txt_email.Text daDataGen.Update(dsDataGen, "general") End With Catch ex As Exception MessageBox.Show(ex.Message, "MyApp", MessageBoxButtons.OK) End Try
But I get a "Syntax error in Update statement" the moment it steps out of daDataGen.Update(dsDataGen, "general") , I really dont know why. Please help http://www.vbforums.com/images/smilies/frown.gif
![]() |
Similar Threads
- problem with update in dataset (VB.NET)
- Modify data in Datagrid (VB.NET)
- delete a record and update the dataset (VB.NET)
- view and edit data from database (VB.NET)
- ASP.Net VB Page to update a users profile not updating. (MS SQL)
- OK; Strange Question here (C#)
- ComboBox UpDate Problem (VB.NET)
- Data Update Wall Smack (C#)
Other Threads in the VB.NET Forum
- Previous Thread: Infinite closing loop... HELP!
- Next Thread: creating an assembly
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account arithmetic array assignment basic binary bing button buttons center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist excel file-dialog firewall folder ftp google hardcopy image images insert isnumericfuntioncall listview login math memory mobile ms navigate net networking opacity output passingparameters peertopeervideostreaming picturebox picturebox1 port print problemwithinstallation project reports" save savedialog searchbox serial soap sorting string table tcp temp text textbox timer toolbox trim update updown upload useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio web wpf





