Why "Edit", "Delete", "New" on DetailsView does not work
Posted on 2012-03-17
We're creating some web application using VS 2010 with Visual Basic.
We try to insert a new record into an ACCESS table, or update/delete an existing record using DetailsView associated with AccessDataSource
We configure DetailsView to bind with the AccessDataSource and also configure the AccessDataSource for SELECT, INSERT, UPDATE, and DELETE statements.
In DetailsView we check "Enable Inserting", "Enable Editing", "Enable Deleting"
The problem is that when we try to update a record, after updating data in text boxes of DetailsView and clikcing "Update", the record is not updated. When we try to deletea record, after clikcing "Delete", the record is not deleted. It is still there.
When we try to insert a new record, it crashes with the error "Primary key cannot be NULL" even though we carefully check to be sure that we enter the primary key - of text (not auto-number)
(NOTES: we can retrieve data from ACCESS table correctly - the DetailsView displays the data correctly)
If you know how to fix these problems, please help.
Thanks a lot,