|
Posted by John Bell on 10/08/05 16:37
Hi
You may want to try using EXEC for your select statement
declare @errorcode int
EXEC ('select * from abc')
SET @errorcode = @@error
--writing log
insert adaten.dbo.loghist(logdatum,loginfo,logfehler,saetze)
values (getdate(),'test',@errorcode,25)
John
<lvpaul@gmx.net> wrote in message
news:1128491173.083475.231000@o13g2000cwo.googlegroups.com...
Thanks, but it doesn΄t work
This is my script - its a file c:\test.sql
declare @errorcode int
select * from abc
SET @errorcode = @@error
--writing log
insert adaten.dbo.loghist(logdatum,loginfo,logfehler,saetze)
values (getdate(),'test',@errorcode,25)
The table "abc" don΄t exist.
If I call the script
osql /E /n /ic:\test.sql (with or without /b) the insert anweisung
instruction won΄t be executed.
I want something like ON ERROR RESUME NEXT. Is this possible ?
Thanks
aaapaul
Navigation:
[Reply to this message]
|