- VS 2005, Visual Basic
- MS Access mdb
Hi all!
DataAdapter is one of my favourite objects since there's no need to open any connection to the database (yes, no .ldb file created).
And I can get the advantage of using the CommandBuilder.
But sometimes it gives me a headache when this error occurs:
... too many fields...
Yes, it doesn't always happen.
I have tried setting the CommandBuilder's SetAllValues to False so that the edited data would only check the primary keys.
Scenario:
In one of my mdb table I have about 150 fields, four of them are primary key.
Using the DataAdapter, I filled out a DataTable, then get one Datarow from it containing the searched primary keys.
If the DataTable contains the desired primary keys then I use this datarow for editing. If not, create one DataTable.NewRow, fill the PK with unique values and modify the rest of fields.
The above error occurs when the DataAdapter.Update(Datatable) is executed. Again, not always but it happens.
Question:
Is the DataAdapter bound to any maximum modified fields? If so, how many? If not, is there any properties of either the DataAdapter, DataTable, OdbcCommand, or even the Connection that I have to change?
Thank's in advance.
- MS Access mdb
Hi all!
DataAdapter is one of my favourite objects since there's no need to open any connection to the database (yes, no .ldb file created).
And I can get the advantage of using the CommandBuilder.
But sometimes it gives me a headache when this error occurs:
... too many fields...
Yes, it doesn't always happen.
I have tried setting the CommandBuilder's SetAllValues to False so that the edited data would only check the primary keys.
Scenario:
In one of my mdb table I have about 150 fields, four of them are primary key.
Using the DataAdapter, I filled out a DataTable, then get one Datarow from it containing the searched primary keys.
If the DataTable contains the desired primary keys then I use this datarow for editing. If not, create one DataTable.NewRow, fill the PK with unique values and modify the rest of fields.
The above error occurs when the DataAdapter.Update(Datatable) is executed. Again, not always but it happens.
Question:
Is the DataAdapter bound to any maximum modified fields? If so, how many? If not, is there any properties of either the DataAdapter, DataTable, OdbcCommand, or even the Connection that I have to change?
Thank's in advance.