| | |
oleDbCommand - Update
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice wizard xml youareanotmemberofthedebuggerusers





