Hello folks
I've really started to embrace Stored Procedure and thought it would be good to validate within them too.
I'd normally validate in a VBA function but I like the approach of having rules and business logic stored centrally within SQL Server.
I shall have tables used within different front ends, so why duplicate validation when, for example, inserting a new record?
My problem is this: is there a simple way to handle/trap the error produced in the stored procedure using the RAISERROR function? Presently I can only return the error in the error handler, which is:
Is this the best I can get?
Many thanks
I've really started to embrace Stored Procedure and thought it would be good to validate within them too.
I'd normally validate in a VBA function but I like the approach of having rules and business logic stored centrally within SQL Server.
I shall have tables used within different front ends, so why duplicate validation when, for example, inserting a new record?
My problem is this: is there a simple way to handle/trap the error produced in the stored procedure using the RAISERROR function? Presently I can only return the error in the error handler, which is:
Code:
ODBC--call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]This is a test error 15/1! ahhhhh! (#50000)
Is this the best I can get?
Many thanks