E
Earl
Head-scratcher here .... I have a routine that updates manufacturer data
using the dataAdapter and dataSet. My code correctly opens the connection,
loads up the existing table, and adds a row to the DataTable. But when it
gets to updating the adapter, gives an exception with the error message:
"Update unable to find TableMapping['dtManufacturer'] or Data Table
'dtManufacturer'."
Yet the data table name is correct, and the column names perfectly match the
database names. I've checked syntax, variable names, etc. I am quite stumped
on this, and having read quite a bit about TableMapping -- I am not
convinced that is the problem. Is there any other screwball reason I could
be getting this error?
Here is the snippet that is failing (on the Update command):
Dim dsChanges As DataSet
dsChanges = dsManufacturers.GetChanges
dsManufacturers.AcceptChanges()
daManufacturers.Update(dsChanges, "dtManufacturer")
using the dataAdapter and dataSet. My code correctly opens the connection,
loads up the existing table, and adds a row to the DataTable. But when it
gets to updating the adapter, gives an exception with the error message:
"Update unable to find TableMapping['dtManufacturer'] or Data Table
'dtManufacturer'."
Yet the data table name is correct, and the column names perfectly match the
database names. I've checked syntax, variable names, etc. I am quite stumped
on this, and having read quite a bit about TableMapping -- I am not
convinced that is the problem. Is there any other screwball reason I could
be getting this error?
Here is the snippet that is failing (on the Update command):
Dim dsChanges As DataSet
dsChanges = dsManufacturers.GetChanges
dsManufacturers.AcceptChanges()
daManufacturers.Update(dsChanges, "dtManufacturer")