Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arguments are of the wrong type...

Status
Not open for further replies.

xterra

Programmer
Apr 5, 2001
71
US
I am getting the error Arguements are of the wrong type, invalid, or out of acceptable range.

I have an ActiveX DLL that I created with VB and am calling from ASP. I have tracked the problem down to this procedure but I don't see what is wrong with it.

Here is my ASP Code

dim objbustag
dim colTag

set objbustag = server.CreateObject("Tags.BusTag")
set colTag = server.CreateObject("Tags.colTags")

objbustag.LoadTagCollection request.form("txtLicenseNumber"),colTag

I thought that maybe my VB Code was not working so I commented all the code and all I am doing is passing the parameters, This is my Business object...

Public Sub LoadTagCollection(ByVal DriversLicense As Variant, colTags As Variant)

m_objDBTag.LoadTagCollection DriversLicense, colTags

End Sub

here is my Database object that the business object calls above...

Public Sub LoadTagCollection(ByVal DriversLicense As Variant, colTags As Variant)

End Sub

Like I said there is no code in the Database object So I don't see why the data types could be invalid. If you see anything wrong let me know.

thanks,

Adam
 
I have read several places not to put two classes into a custom COM object (including a book by WROX, which I consider to be a very reliable source). I have yet to see a good explanation for why not, but I never tested it, as I just took the advice and don't do it.

This might possibly be why, but I could not confirm or deny that.

One thing that jumps out at me is the exact same function names w/in the same project in your vb project. Then, you're trying to call another function by the same name from w/in the function with the same name. That very well may be confusing it.

There's not even a declaration of the object on which you're trying to call it. I see the m_objDBTag. reference, but don't see the declaration of any other object to really tell your function:
"Look, I want to call the method of this particular object, not the one I'm currently in"

Those would be my best two guesses given the current info.

hope it helps! :)
paul
penny1.gif
penny1.gif
 
Yeah I'm sorry I didn't put where I declare the m_objDBTag object as type DBTag, but I do. I think you are right about having 2 tiers in the COM object. I will put it into 1 and see what that does. It's strange huh, you are taught Object oriented programming and its importance but yet you can't use it's full capabilites in ASP. Thanks for all your help paul.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top