-
ASP and DLL
I have a VB DLL. When I reference it in a VB project...it calls everything
from the DLL and executes correctly. Now I would like to use this DLL with
an ASP page to cut down on the ASP code. How do I do this? I will be sending
one piece of information to the DLL. There it runs it's route. That's it.
-
Re: ASP and DLL
Register the component on the web server. Instantiate the object in your
asp code using the Server.CreateObject("")
Set the new object and then use it just as you would in vb.
"john" <bytexbyte@hotmail.com> wrote:
>
>I have a VB DLL. When I reference it in a VB project...it calls everything
>from the DLL and executes correctly. Now I would like to use this DLL with
>an ASP page to cut down on the ASP code. How do I do this? I will be sending
>one piece of information to the DLL. There it runs it's route. That's it.
-
Re: ASP and DLL
I am pretty sure I have done that. Here is what I am trying:
Number = Request.Form("Number")
ToEmail = Request.Form("ToEmail")
dim objDll
set objDll = server.createobject("MyDLL.clsMyDLL")
objDll.SendMail (Number),(ToEmail) 'Type Mismatch error on this line.
set objDll = nothing
Inside the dll, it takes the "Number" and finds the matching record in an
Access database. It does all of this fine. Then it should send an email with
the record information to the "ToEmail" from the original posting page. The
function in the dll is set to variant, as well as the passing variables.
I can't get past this type mismatch error. I set the variables to variant
from information I gathered from searching the web. I have been at this for
quite some time. Thanks for any help.
-
Re: ASP and DLL
Try using the Data Type Conversion Function.
for example:-
objDll.SendMail CInt(Number),CStr(ToEmail)
Somnath
"John" <bytexbyte@hotmail.com> wrote:
>
>I am pretty sure I have done that. Here is what I am trying:
>
>Number = Request.Form("Number")
>ToEmail = Request.Form("ToEmail")
>dim objDll
>set objDll = server.createobject("MyDLL.clsMyDLL")
>objDll.SendMail (Number),(ToEmail) 'Type Mismatch error on this line.
>set objDll = nothing
>
>Inside the dll, it takes the "Number" and finds the matching record in an
>Access database. It does all of this fine. Then it should send an email
with
>the record information to the "ToEmail" from the original posting page.
The
>function in the dll is set to variant, as well as the passing variables.
>I can't get past this type mismatch error. I set the variables to variant
>from information I gathered from searching the web. I have been at this
for
>quite some time. Thanks for any help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks