Monday, March 12, 2012

Lookup problem

I have a problem related to execution of a lookup in a transformation script in SQL server 2000 DTS package.

I have a lookup that launches a stored procedure:

EXECUTE TableID ?, ? output

This lookup is executed from a script like this:

Dim newID as integer
DTSLookups("GetNewID").Execute "string_data", newID

The problem is that the second parameter (it is an output parameter) is unchanged althghough it is changed in the stored procedure

Any suggestions ?

Thank you, Gabyx

The Execute method won't assign a value to newID. It returns a value, or array of values.

Try this:

Dim newID as integer
newID = DTSLookups("GetNewID").Execute "string_data", newID

Let me know if this works for you.

No comments:

Post a Comment