david7777777777
Programmer
I'm adding new records to a SQL 2000 database via ASP pages. I'm slightly re-designing an app I made to track shipments of boxes. The old app was working fine using the initialize then add routine. However, with this new version of teh application, I'm not using an auto-created integer field as the Primary Key in the tbl_Shipments table. Instead I'm using the tracking number as the Primary Key field for the tbl_Shipments table. I'm thinking this is where I'm having a problem.
My old method of initializing a new, blank record with a btn_NewShipment button, having the user fill-in the DTC's with the data, then saving the new record with a btn_Save button, generates errors. I've included my latest error below. If you need more info to know what's going on let me know. It's a fairly simple and straight-forward form and process. Thanks.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_tbl_Shipments'. Cannot insert duplicate key in object 'tbl_Shipments'.
/_ScriptLibrary/Recordset.ASP, line 311
This error appears after I've filled in the DTC's and clicked the btn_Save button to save the new record.
My old method of initializing a new, blank record with a btn_NewShipment button, having the user fill-in the DTC's with the data, then saving the new record with a btn_Save button, generates errors. I've included my latest error below. If you need more info to know what's going on let me know. It's a fairly simple and straight-forward form and process. Thanks.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_tbl_Shipments'. Cannot insert duplicate key in object 'tbl_Shipments'.
/_ScriptLibrary/Recordset.ASP, line 311
This error appears after I've filled in the DTC's and clicked the btn_Save button to save the new record.