dbTalk Databases Forums  

Create a log entry from ActiveX Script task?

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


Discuss Create a log entry from ActiveX Script task? in the microsoft.public.sqlserver.dts forum.



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

Default Create a log entry from ActiveX Script task? - 03-23-2005 , 08:30 AM






Is there a way to stick something in the package's configured log from an
ActiveX Script? I've got a script that uses an external component to help
parse an XML document that's loaded from a text field in the source table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire step.

Any help would be appreciated.

Lamont Adams
MCP



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Create a log entry from ActiveX Script task? - 03-23-2005 , 02:38 PM






What about

DTSPackageLog.WriteStringToLog "Hello World"




"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote


Quote:
Is there a way to stick something in the package's configured log from an
ActiveX Script? I've got a script that uses an external component to help
parse an XML document that's loaded from a text field in the source table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire step.

Any help would be appreciated.

Lamont Adams
MCP


Reply With Quote
  #3  
Old   
Lamont
 
Posts: n/a

Default Re: Create a log entry from ActiveX Script task? - 03-23-2005 , 03:41 PM



Hmm. Hadn't run across that one yet... sounds like a winner. Thanks
"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
What about

DTSPackageLog.WriteStringToLog "Hello World"




"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote in message
news:lamontadams1_at_yahoo_dot_com.nospam:

Is there a way to stick something in the package's configured log from an
ActiveX Script? I've got a script that uses an external component to help
parse an XML document that's loaded from a text field in the source
table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire
step.

Any help would be appreciated.

Lamont Adams
MCP




Reply With Quote
  #4  
Old   
Lamont
 
Posts: n/a

Default Re: Create a log entry from ActiveX Script task? - 03-23-2005 , 03:49 PM



By the way, is there a list somewhere of what intrinsic objects are
available to a script in DTS?

"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote

Quote:
Hmm. Hadn't run across that one yet... sounds like a winner. Thanks
"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:OZgoTe%23LFHA.3988 (AT) tk2msftngp13 (DOT) phx.gbl...
What about

DTSPackageLog.WriteStringToLog "Hello World"




"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote in message
news:lamontadams1_at_yahoo_dot_com.nospam:

Is there a way to stick something in the package's configured log from
an
ActiveX Script? I've got a script that uses an external component to
help
parse an XML document that's loaded from a text field in the source
table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire
step.

Any help would be appreciated.

Lamont Adams
MCP






Reply With Quote
  #5  
Old   
Simon Worth
 
Posts: n/a

Default Re: Create a log entry from ActiveX Script task? - 03-24-2005 , 08:23 AM



Hey Allan,
Is DTSPackageLog.WriteStringToLog for logging errors only?
Is there a way you can use DTSPackageLog.WriteStringToLog to log
information.
Simple example
DTSPackageLog.WriteStringToLog "ActiveX Script 1 Begun"
DTSPackageLog.WriteStringToLog "ActiveX Script 1 Checking for file..."
DTSPackageLog.WriteStringToLog "ActiveX Script 1 File 1 found..."

I'm not sure I'd ever actually use this to do something like this, I'm
just curious as to the functionality of the statement.

Simon Worth

Allan Mitchell wrote:
Quote:
What about

DTSPackageLog.WriteStringToLog "Hello World"




"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote in message
news:lamontadams1_at_yahoo_dot_com.nospam:

Is there a way to stick something in the package's configured log from an
ActiveX Script? I've got a script that uses an external component to help
parse an XML document that's loaded from a text field in the source
table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire
step.

Any help would be appreciated.

Lamont Adams
MCP



Reply With Quote
  #6  
Old   
Lamont
 
Posts: n/a

Default Re: Create a log entry from ActiveX Script task? - 03-24-2005 , 09:11 AM



Allan,

Looks like this is only available to ActiveScriptTasks, not to
transformation scripts. I get script errors when I try to use it in the
latter situation.

Any other ideas? :-)

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
What about

DTSPackageLog.WriteStringToLog "Hello World"




"Lamont" <lamontadams1_at_yahoo_dot_com.nospam> wrote in message
news:lamontadams1_at_yahoo_dot_com.nospam:

Is there a way to stick something in the package's configured log from an
ActiveX Script? I've got a script that uses an external component to help
parse an XML document that's loaded from a text field in the source
table.
If the document is invalid, I want to log the record's key value and
continue processing with the next record rather than fail the entire
step.

Any help would be appreciated.

Lamont Adams
MCP




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.