mnongkhlaw
Programmer
Dear Folks,
I have an ASP page using OLEDB connection to an Access database, a command object to a table (vendor) with fields Vendor_ID and Vendor_Name. Vendor_ID has been defined as a primary key in the table. I use the FormManager DTC to manage Adds,Edits and Deletes. When I test the page by Adding a duplicate primary key and clicking Save button, I get :
Error Type:
Microsoft JET Database Engine (0x80004005)
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
/hardware/_ScriptLibrary/Recordset.ASP, line 311
How do I display a friendly message in lieu of the above and then return the user to the page's Add Mode again?
Please help.
Mark
I have an ASP page using OLEDB connection to an Access database, a command object to a table (vendor) with fields Vendor_ID and Vendor_Name. Vendor_ID has been defined as a primary key in the table. I use the FormManager DTC to manage Adds,Edits and Deletes. When I test the page by Adding a duplicate primary key and clicking Save button, I get :
Error Type:
Microsoft JET Database Engine (0x80004005)
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
/hardware/_ScriptLibrary/Recordset.ASP, line 311
How do I display a friendly message in lieu of the above and then return the user to the page's Add Mode again?
Please help.
Mark