Re: Auto Exiting Store Procedures
From: Peter (anonymous_at_discussions.microsoft.com)
Date: 02/23/04
- Next message: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Previous message: Uri Dimant: "Re: Attaching a 7.0 db?"
- In reply to: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Next in thread: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Reply: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 23 Feb 2004 02:34:08 -0800
Thanks Tibor,
Could you point me to a resource that would show me what
can, and can't be done.
I have looked at BOL but with no success.
Peter
>-----Original Message-----
>For some errors, SQL Server will terminate the batch.
Such errors include
>many datatype conversion errors, references to objects
which doesn't exist
>and other "hard" errors. There is no setting for this,
I'm afraid.
>
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>
>"Peter" <anonymous@discussions.microsoft.com> wrote in
message
>news:1427001c3f9f5$3edf2120$a101280a@phx.gbl...
>> I'm sorry Uri, but I don't understand your answer.
>>
>> Here is an example. The following code will always fail
as
>> it is trying to put a char in an int.
>>
>> CREATE procedure p_Test
>> as
>>
>> DECLARE @Error as int
>>
>> SET @Error = 0
>>
>> --Update the table name and all column names
>> Insert into tblText (TestInt)
>>
>> --List all the parameters in the same order as the
column
>> names
>> Values ('A')
>>
>> SET @Error = @@ERROR
>>
>> Return @Error
>> GO
>>
>>
>> So what I want to do is stop the SP exiting at the
error,
>> but continue so I can trap, and deal with it.
>>
>> Currently the SET @Error = @@ERROR doesn't happen.
>>
>> Peter
>>
>> >-----Original Message-----
>> >Peter
>> >CREATE PROC my_proc
>> >@par INT
>> >AS
>> >IF @par >1
>> >SELECT OrderID FROM Orders
>> >ELSE
>> >RETURN
>> >GO
>> >EXEC my_proc 2
>> >GO
>> >DROP PROC my_proc
>> >
>> >"Peter" <anonymous@discussions.microsoft.com> wrote in
>> message
>> >news:1504501c3f9f1$e06b5170$a601280a@phx.gbl...
>> >> Dear All,
>> >>
>> >> Is there a way of turning off the auto exiting of
store
>> >> procedures when there is an error ?
>> >>
>> >> Thanks
>> >> Peter
>> >
>> >
>> >.
>> >
>
>
>.
>
- Next message: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Previous message: Uri Dimant: "Re: Attaching a 7.0 db?"
- In reply to: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Next in thread: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Reply: Tibor Karaszi: "Re: Auto Exiting Store Procedures"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|