SQL Server reserves the right to error out immediately in the case of
severe errors -- which in this case is the inability to connect to the
remote database.
I used to remember how to check for a linked server's existence, but am
drawing a blank. If no one else provides you a solution send me an
email and I'll search out the answer.
Beth
-----Original Message-----
From: georgebiko@h... [mailto:georgebiko@h...]
Sent: Thursday, January 10, 2002 7:44 AM
To: sql language
Subject: [sql_language] Error trapping failure
Hi,
I have this T-SQl code in Microsoft Access 2002 stored procedure editor
but the error handling part never gets to run instead I get the error
message from SQL when I simulate an error condition like disconnecting
the
network cable from the my workstation to the SQL server. I got the same
results when using Query Analyzer. Can someone tell me what's going on.
I'm using SQL Server 2000.
Thanks
Biko
Here is the T-SQL code:
ALTER PROCEDURE del_tcigsstrmt_receipts
AS
--BEGIN TRAN
DELETE TCIGSSTRMT.Cashier.dbo.receipts
IF (@@error<>0)
BEGIN
RAISERROR 20002 'UsersDelProc: Cannot delete because network
link
is not present '
ROLLBACK TRAN
RETURN(1)
END
COMMIT TRAN
RETURN(0)
$subst('Email.Unsub').