all groups > sql server dts > february 2005 >
You're in the

sql server dts

group:

invalid procedure call or argument DTSSource


invalid procedure call or argument DTSSource LP
2/21/2005 8:11:03 AM
sql server dts: I'm using the vbscript below to import values into SQL Server. If a column
is null then I want another value used from a different column.
But I keep gettin the error "invalid procedure call or argument DTSSource"

Any thoughts.
Here is the code.
'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************

' Copy each source column to the destination column
Function Main()

If isnull(DTSSource("Col041").value) and not
isnull(DTSSource("Col042").value) Then
DTSDestination("VID") = DTSSource("Col042")
DTSDestination("VType") = "SA"
ElseIf isnull(DTSSource("Col042").value) and not
isnull(DTSSource("Col041").value) Then
DTSDestination("VID") = DTSSource("Col041")
DTSDestination("VType") = "CA"
ELSE DTSDestination("VType") = "NA"

End If
Main = DTSTransformStat_OK
End Function

Thanks,

Re: invalid procedure call or argument DTSSource LP
2/21/2005 1:11:05 PM
Hi Alan,

Thanks very much for your help on a few issues. I later realized that the
Transformation Properties had columns in the souyrce and destination tabs.
Once I removed those the code ran fine.

Thanks,

LP

[quoted text, click to view]
Re: invalid procedure call or argument DTSSource Allan Mitchell
2/21/2005 7:13:46 PM
Try taking the .Values from your DTSSource references.

[quoted text, click to view]
AddThis Social Bookmark Button