Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase @@errors?

Status
Not open for further replies.

davism

MIS
Nov 9, 2002
140
US
Hi,

I was wondering if someone could help me shed some light on this a question I have, which is what information is captured in @@error that does is not Fatal.

We are trying to put together some standards on sql programming for stored proc, SQL and other database related items but it came to light that we needed to question the Sybase error checkeding with @@error. We wanted to say that @@error checking should be done on milestone event that have a potential impact on data integrity.

If I were to do an INSERT into a table and one of the columns is an integer but the INSERT is trying to insert a string into that integer column, I can a fatal error do I not? So, there is no since in checking @@error because I'll never get there to check it.

If I try to TRUNCATE a table and I get an error - it's going to be a fatal error so there is no sense in error checking that because again, I'll never get to that point.

Your assistance would be greatly appreciated.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top