G
Guest
This is so completely baffling me that I'd throw it out for general
consumption. I have an enterprise application with dozens of DataAdapters.
All are based off a common DataAdapterBase class I engineered to streamline
and standardize how typical data access works across the solution. All work
fine, except for one that I've recently modified - I changed the field names
of the underlying table (and therefore the parameters of the stored
procedures, the fields of the typed DataSet, etc.) Now, when I call
DataAdapter.Update, it fails on an Insert. Specifically, it doesn't pass any
values from the DataRow to the Parameters collection. They're all DbNull.
Updates work fine (there is no mechanism within the UI to Delete rows), as do
Inserts to other tables via other DataAdapters. The Parameters collections
of both the Insert and Update Commands are populated via my common base class
by the same mechanism. I've examined closely several times the DataAdapter,
Command, DataRow, DataSet, etc, objects involved and can't find any
difference between the Insert that's failing and the Update that works (or
any other Insert that I've inspected). There just seems to be no cause. Any
thoughts out there on this one?
consumption. I have an enterprise application with dozens of DataAdapters.
All are based off a common DataAdapterBase class I engineered to streamline
and standardize how typical data access works across the solution. All work
fine, except for one that I've recently modified - I changed the field names
of the underlying table (and therefore the parameters of the stored
procedures, the fields of the typed DataSet, etc.) Now, when I call
DataAdapter.Update, it fails on an Insert. Specifically, it doesn't pass any
values from the DataRow to the Parameters collection. They're all DbNull.
Updates work fine (there is no mechanism within the UI to Delete rows), as do
Inserts to other tables via other DataAdapters. The Parameters collections
of both the Insert and Update Commands are populated via my common base class
by the same mechanism. I've examined closely several times the DataAdapter,
Command, DataRow, DataSet, etc, objects involved and can't find any
difference between the Insert that's failing and the Update that works (or
any other Insert that I've inspected). There just seems to be no cause. Any
thoughts out there on this one?