Problem Updating Table

dotnetnubie

Member
Joined
Jun 4, 2005
Messages
9
Programming Experience
10+
I have a VB.Net application that handles personnel records. A datagrid of employees matching a certain criteria are presented, with a link included in that datagrid. Clicking on the link redirects to another page with detailed info on that employee, all in textboxes and dropdownlists. The user can make changes to the data, and I want to have them click on an "Update" button to update any changes made into the selected row in the database. However, I'm having difficulties in trying to do that. My attempt to update the database doesn't seem to be working either.

The update command is auto-generated by the Web Form Designer, so it would seem that it's not necessary to change anything in the command. Right now, I'm only trying to take the updated value from the "address" text box and update the dataset, and then update the table from the dataset:

Ds_fpersonnel_detail1.fs_personnel(dsrow)("ADDRESS") = Me.address.Text
Me.SqlDataAdapter1.Update(Ds_fpersonnel_detail1)

dsrow is assigned earlier in the process to the current record position after a successful query, which is working fine.

When the last line is executed, I receive the following error:

<H2>Line 1: Incorrect syntax near '='.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
</H2>Can someone please tell me what I'm doing incorrectly? Thanks so much in advance.

Regards,
dotnetnubie :(
 
Back
Top