|
-
Oct 29th, 2002, 04:27 PM
#1
Thread Starter
New Member
Help Help Calling Subs in ASP
I can't seem to find any info on this anywhere on the net. I know it's prolly real basic but I'm new at thisl.
Say I have a sub procedure in VB6.0 that creates a new entry in a database...
Public Sub Create(RefNum as Long, Name as String)
How do I call it and use it? I tried...
oObj.Create (200,"Joe") but the error says "Cannot use parentheses when calling a Sub".
Thanks in advance
-
Oct 30th, 2002, 12:58 AM
#2
Lively Member
i can give three options:
1. u can still use parenthesis, but just add "call" before the method: call oObj.Create (200,"Joe")
2. get rid of the parenthesis, just type: oObj.Create 200,"Joe"
3. replace the sub to function and then u can use the original statement
-
Oct 30th, 2002, 03:08 AM
#3
I take it your sub procedure is in a vb6 written Dll file?
If so, make sure the sub procedure is declared publically and the class module it's contained in has it's instancing property set to multiuse.
You can then call on the code like this:
Server.Createobject("mydllprojectname.mydllclassname")
http://www.vbforums.com/showthread.p...ht=dll+and+asp
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
|
Click Here to Expand Forum to Full Width
|