dbTalk Databases Forums  

Newbie = Problem catching errors in an ActiveX task

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Newbie = Problem catching errors in an ActiveX task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kumar
 
Posts: n/a

Default Newbie = Problem catching errors in an ActiveX task - 09-14-2004 , 08:08 AM






Folks,

I have a piece of code that looks something like:

On Error Resume Next

' Instantiate objects for the text and sql connections
set objPkg = DTSGlobalVariables.Parent
set objtxtConn = objPkg.Connections("txtConn")

If Err.Number <> 0 then ...

The code works fine. I just wanted to test the error handling code in
the IF block. I changed the connection name in the above line from
"txtConn" to "txtCaonn", I get an error popup that "txtCaonn"
connection was not found. If I entered a line such as "i=1/0" , the
task runs properly and the IF code catches the error.

Are there some errors in ActiveX that are immediately raised
regardless of whether the code was in a On Error Resume Next block ?

Thanks !

Reply With Quote
  #2  
Old   
Krish
 
Posts: n/a

Default Re: Newbie = Problem catching errors in an ActiveX task - 09-14-2004 , 12:17 PM






Try looking at package properties...you should be able to figure out error
handling settings... Dont take my word...im still newbie.......

"Kumar" <kumarbs (AT) lycos (DOT) com> wrote

Quote:
Folks,

I have a piece of code that looks something like:

On Error Resume Next

' Instantiate objects for the text and sql connections
set objPkg = DTSGlobalVariables.Parent
set objtxtConn = objPkg.Connections("txtConn")

If Err.Number <> 0 then ...

The code works fine. I just wanted to test the error handling code in
the IF block. I changed the connection name in the above line from
"txtConn" to "txtCaonn", I get an error popup that "txtCaonn"
connection was not found. If I entered a line such as "i=1/0" , the
task runs properly and the IF code catches the error.

Are there some errors in ActiveX that are immediately raised
regardless of whether the code was in a On Error Resume Next block ?

Thanks !



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.