Short version:
How do I handle an error that occurs on my asp page when an attempt is made to add a duplicate record to a SQL7 table with a unique index through an ADO using vbscript?
Additional information:
I've got an ASP page that pulls data from two different databases and puts it all together for the user. Occasionally, it encounters a case where a reference for one system cannot be found in the other.
Relying on the user to report such instances so they can be fixed is not realistic, so I've created a table in a SQL7 db. Whenever the page runs into this situation it runs an append query to add a record into the table so someone can be informed about and fix the problem.
The problem is, I don't need to have a single problem reported 50 times in the table, so I tried adding a UNIQUE index in the SQL7 table. My thinking was that if it tried to add record that was a duplicate in the key field, it would just ignore it and move on. Unfortunately, I have found this is not the case. Instead it fails, giving me Violation of UNIQUE KEY constraint error.
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!
How do I handle an error that occurs on my asp page when an attempt is made to add a duplicate record to a SQL7 table with a unique index through an ADO using vbscript?
Additional information:
I've got an ASP page that pulls data from two different databases and puts it all together for the user. Occasionally, it encounters a case where a reference for one system cannot be found in the other.
Relying on the user to report such instances so they can be fixed is not realistic, so I've created a table in a SQL7 db. Whenever the page runs into this situation it runs an append query to add a record into the table so someone can be informed about and fix the problem.
The problem is, I don't need to have a single problem reported 50 times in the table, so I tried adding a UNIQUE index in the SQL7 table. My thinking was that if it tried to add record that was a duplicate in the key field, it would just ignore it and move on. Unfortunately, I have found this is not the case. Instead it fails, giving me Violation of UNIQUE KEY constraint error.
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!