G
Guest
I get an Error when i try to update a row in a table using the
dataadapter.update method.
The table in this case is only two columns, the 1st col is the key
(bucket_status) and
the 2nd column is a string (Comments) and can be null.
this is a parent table to another child table, my data base contains 7
tables that are all related.
when a change is done to the data in the datagrid, i extract the changed
records from the dataset,
then i pass the new dataset (with the changed rows) to the
dataadapter.update method.
When i try to change the value of the comments column, i get the following
error:
"[DB2/LINUX390] SQL0418N A statement contains a use of a parameter marker
that is not valid. SQLSTATE=42610"
The SQL code for the dataadapter was auto generated and it looks like this:
UPDATE dbname.Bucket_tbl
SET BUCKET_STATUS = ?, COMMENTS = ?
WHERE (BUCKET_STATUS = ?) AND (COMMENTS = ? OR ? IS NULL AND COMMENTS IS NULL)
my code is fairly simple:
daBucketStatus.Update(dsChanges)
This is a DB2 database and i am using an OleDb connection.
* inserts and selects work ok, problem is with the update and delete methods.
I can run the generated SQL code in the command window with the values
substitued for the parms and it works ok, however, the update method always
returns the above error?!!
Please help!
Thanks
Riad Amro
dataadapter.update method.
The table in this case is only two columns, the 1st col is the key
(bucket_status) and
the 2nd column is a string (Comments) and can be null.
this is a parent table to another child table, my data base contains 7
tables that are all related.
when a change is done to the data in the datagrid, i extract the changed
records from the dataset,
then i pass the new dataset (with the changed rows) to the
dataadapter.update method.
When i try to change the value of the comments column, i get the following
error:
"[DB2/LINUX390] SQL0418N A statement contains a use of a parameter marker
that is not valid. SQLSTATE=42610"
The SQL code for the dataadapter was auto generated and it looks like this:
UPDATE dbname.Bucket_tbl
SET BUCKET_STATUS = ?, COMMENTS = ?
WHERE (BUCKET_STATUS = ?) AND (COMMENTS = ? OR ? IS NULL AND COMMENTS IS NULL)
my code is fairly simple:
daBucketStatus.Update(dsChanges)
This is a DB2 database and i am using an OleDb connection.
* inserts and selects work ok, problem is with the update and delete methods.
I can run the generated SQL code in the command window with the values
substitued for the parms and it works ok, however, the update method always
returns the above error?!!
Please help!
Thanks
Riad Amro