Home > Archive > MS SQL Server DTS > March 2006 > Need help on DTSTransformation/DTSLookups









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Need help on DTSTransformation/DTSLookups
desperator

2006-03-31, 1:28 pm

I have a Transformation task which invokes a DTSLookups (from the ActiveX
script). The lookup contains two sql statements separated by the semicolon,
like this:

update table1 set val = ? where id = ?; select @@ERROR, @@ROWCOUNT

This is how I invoke the lookup from the vbscript:

errorCodeArray = DTSLookups("mylookup").Execute(val1, val2)

I also have a step to handle the "On Failure" workflow.

Let's say for some reason the update statement fails, my "On Failure" task
will be executed. However, I can't seem to get the correct value for the sql
error code from the @@ERROR. It gives me a 0.

Can someone help me to capture the @@ERROR from the failed sql statement in
DTSLookups?

any help is appreciated.

Desperator.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com