"Invalid procedure call or argument" -
04-26-2005
, 07:27 PM
Pleaase help!!!
I have created a simple Class DLL in VB.Net 2003 and call it from a ActiveX
Script Task in DTS to get a value returned but I got the error as :
"Invalid procedure call or argument"
My simple VB class as (it is in project named test):
Public Class clTest
Public Function returnValue(ByVal oStep As DTS.Step) As String
returnValue = oStep.Description
MsgBox returnValue
End Function
End Class
My ActiveX Script as :
Function Main()
Dim oDTSTest
Dim oCurPkg
Dim oStep
Dim sReturnText
Set oCurPkg = DTSGlobalVariables.Parent
For Each oStep In oCurPkg.Steps
If oStep.Description = "Test" Then
Exit For
End If
Next
Set oDTSTest = CreateObject("Test.clTest")
oDTSTest.returnValue(oStep) //This does work ..a msg box appears w/
correct Step's description
sReturnText = oDTSTest.returnValue(oStep) //This does not work and
the above error message box appear.
End Function
It seems to me that my VB.Net class' function does not return any value.
I appologize for the long writing and really appreciate all the help
TT. |