Jyozeal
asked on
Error handling in SQL Server
Hi All,
Please consider below code.
for retrieivng the errornumber and state we can use ERROR_NUMBER(), ERROR_STATE() etc.
What should be used to retrieve the object where error is reported from in this case "Procedure P_CreateSampleTable".
Also line no doesn't seem to exactly represent the source of error. Regret if this is too trivial. Any inputs are appreciated.
Please consider below code.
Msg 2714, Level 16, State 6, Procedure P_CreateSampleTable, Line 93
There is already an object named 'sampletable' in the database.
for retrieivng the errornumber and state we can use ERROR_NUMBER(), ERROR_STATE() etc.
What should be used to retrieve the object where error is reported from in this case "Procedure P_CreateSampleTable".
Also line no doesn't seem to exactly represent the source of error. Regret if this is too trivial. Any inputs are appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER