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

Invoking VB class module from ASP code 1

Status
Not open for further replies.

Coding

Programmer
Aug 13, 2000
25
CA
Does anyone know how to write the code for calling VB class inside the ASP code. I need it for sending E-mail from the client side web page. The button will pass the form to the ASP code on server side and there should invoke the VB class that calls E-mail objects. I have already the class written and only the code from the server side missing.
 
Compile the VB class to a dll, register it on the server and use "Server.CreateObject" to create an instance of your VB class.

Good luck!

Jordi Reineman
 
Automation error ClassFactory cannot supply requested class
I have a vbscript page calling an instance of a com object. i made some code changes to the com object and recompiled and now I am getting the error described above. Please bear in mind I inherited this code with no documentation. Here is the vbscript code that instatiates the com object:

set tbl = server.CreateObject("TableMaster.HTMLTable")
ar = tbl.SaveTable (rs,TotalsRs,cstr(cn),cstr(report),cstr(exclude),cstr(qsearch),cstr(visibility),cstr(grouping),cstr(txtfilter),cstr(txtsort),cstr(fnt),cstr(face),cint(margin))

Can someone please help?

Thanks Ever So,
TJB2 :cool:

"Experience is that marvelous thing that enables you to recognize a mistake when you make it again."

Franklin P. Jones
 
tjb2,
are you sure you have compile the VB Class with Binary compatibility checked ??
If not make sure you do that from
Project->project properties ->select the component tab ->under this make sure version compatibility is binary!!

fix the bug
 
with asp any parameters passed to a dll will be passed as variant. Try making the parameters of your SaveTable function variants

eg

public function SaveTable(recordset as variant, total as variant, className as variant ....

instead of

public function SaveTable(recordset as object, total as string, className as string ....

Your error messge sounds like it cant even reference the dll which suggests that you may not have referenced it, registered it or compiled it properly.

on error goto hell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top