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.
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.