| | |
oleDbCommand - Update
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: May 2007
Posts: 4
Reputation:
Solved Threads: 0
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("me").Rows(inc).Item(2) = txtFirstName.Text
ds.Tables("me").Rows(inc).Item(3) = txtLastName.Text
da.Update(ds, "me")
Im getting a hard time on updating the database, What should I do to update or even add to the database.
The code above is what I use but still it gives me an error.
Please help. Im just new in using VB.net.
Thanks.
ds.Tables("me").Rows(inc).Item(2) = txtFirstName.Text
ds.Tables("me").Rows(inc).Item(3) = txtLastName.Text
da.Update(ds, "me")
Im getting a hard time on updating the database, What should I do to update or even add to the database.
The code above is what I use but still it gives me an error.
Please help. Im just new in using VB.net.
Thanks.
obviously this is an ASP.NET message board if i am not mistaken. But it seem that you are sending the Update Method a string ("me"), if you set your update command as default it should except strings, integers, bool as default values for each item in the table. maybe you should be doing something more like
Anyways when you open the method, opening it would be putting the "(" after the method name, it should display a tool tip with what the method needs sent it. It should look like (string FirstName,string LastName) and you have to match each item with what value you want sent it..... just take a look.
Hope that helps in some way.
ASP.NET Syntax (Toggle Plain Text)
da.Update(txtFirstName.text, txtLastName.Text)
Anyways when you open the method, opening it would be putting the "(" after the method name, it should display a tool tip with what the method needs sent it. It should look like (string FirstName,string LastName) and you have to match each item with what value you want sent it..... just take a look.
Hope that helps in some way.
- mike mclennan
put a try catch block around it and create a message box to display the incoming errors
and then run through it with break points. use the F9 key to create a break point and then run through the program with the debugger. The debugger is the most powerful tool in your arsenal. use it as often as you can.
ASP.NET Syntax (Toggle Plain Text)
MessageBoc.Show(e.Message)
and then run through it with break points. use the F9 key to create a break point and then run through the program with the debugger. The debugger is the most powerful tool in your arsenal. use it as often as you can.
- mike mclennan
![]() |
Similar Threads
- Visual C#: Inserting an Access Database Record (C#)
- oleDbCommand - Update (ASP.NET)
- how do i update to Access db? (C#)
- access UPDATE problems (MS Access and FileMaker Pro)
- ADO.Net SQL UPDATE using OleDBAdapter (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: how to autogenerate date
- Next Thread: help Web server Crashes
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mouse mssql multistepregistration news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





