Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Exception from remore server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-05-03 : 08:01:27
Vikram writes "Hi,

We are working with SQL server 2k.
There is a SP. In the stored procedure, would be inserting/updating a table in a different remote machine. If that insert or update throws an exception, we are not able to catch the exception.

Like if I have a table “x” in Machine-2 and SP in Machine-1 is executed to Insert some rows [ say id =1 to 100 ],
but say for id= 9 the insert fails as that id already exists in “x” ,
I must be able to capture the exception in Machine-1 SP and proceed with id =10 and further . But statement terminates on Insert of id=9 and even @@ error variable is not filled.
We are not able to proceed further. Any clues ?

Thanks
Vikram"

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-05-03 : 08:09:09
Look for RaiseError in SQL Server Book online .. if its helps

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page
   

- Advertisement -