peggasus88
Technical User
Hi,
I purposely entered a primary key value that already existed in my database table and as expected, I received the error below. I would like to pop up an alert box to the User, rather than have them redirected to such a scary error page. =) I would like my alert box to be specific and pop up when a specific error occurs (Violation of PRIMARY KEY contraint...), and not whenever any type of error occurs. Can someone please show me how to do this?
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_TestCardInfo'. Cannot insert duplicate key in object 'TestCardInfo'.
Thank you for any help you can give,
~*Peggy*~
I purposely entered a primary key value that already existed in my database table and as expected, I received the error below. I would like to pop up an alert box to the User, rather than have them redirected to such a scary error page. =) I would like my alert box to be specific and pop up when a specific error occurs (Violation of PRIMARY KEY contraint...), and not whenever any type of error occurs. Can someone please show me how to do this?
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_TestCardInfo'. Cannot insert duplicate key in object 'TestCardInfo'.
Thank you for any help you can give,
~*Peggy*~