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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dll works in vb but not in ASP.

Status
Not open for further replies.

jamieslover

Programmer
Feb 4, 2002
16
US
I've created and compiled a dll that works great when I refrence it from vb but causes an error on one of it's methods when I try to use it in a ASP page.
Have any of you had a similar problem or know how to solve mine?
I am able to write and read properties in the ASP page, but something must be wrong with the Sub Routine I call because it says "Type Mismatch: 'AddSource'"
I can post code if it will help you help me.
 
Hi jamieslover,

Are all the Arguements in all your dll Functions Variants?
They should be because ASP Variables are Variant in nature.


Codefish
 
no. let me see if that works, (if it doesn't work, I still think it's an excelent idea.)
 
Well, I changed them all to variants, but It didn't work so instead of calling the sub with parameters I made each of the parameters properties that I had to set before running the sub:
Instead of

MyReport.AddSource myObjRS, "Header"

I wrote it:

MyReport.ObjRS = myObjRS
myReport.Section = "Header"
MyReport.AddSource

Now it works, but I'd rather have been able to do it another way- must I make all the parameters optional? It doesn't matter too much- atleast it works now, thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top