dbTalk Databases Forums  

"Invalid procedure call or argument"

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


Discuss "Invalid procedure call or argument" in the microsoft.public.sqlserver.dts forum.



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

Default "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.





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.