Checklist for VB Component Trouble ShootingBy Ryan S.
When developing VB Components (or Business Objects), there are, of course, bugs and errors I run across. Here are the most common errors I find myself making, and fixes for the errors. Hope this helps!
1) Did you reference ActiveX Server Pages in the Project - References area?
Fix - Click Project, References, and click ActiveX Server Pages.
2) Did you create the scripting context?
Public Sub onStartPage(sc as ScriptingContext) mySC = sc End Sub
3) Did you dim your objects properly?
Dim myResponse as Response
4) Is the ASP code correctly refrencing the DLL (is it the same
5) Do you have multiple components with the same Project/ClassName registered using regsvr32?
regsvr32 -u all the other component files
6) If you are using ADO, have you include the ActiveX Data Objects reference in your program?
Fix - Click Project, References, and click ActiveX Data Objects
7) If you are using ADO, are you using CreateObject("ADODB.Connection") instead of set?
Fix - Instead of CreateObject, do
set myConn = CreateObject("ADODB.Connection")
8) Is PWS/IIS running?
Fix - Load it
9) Are your Property statements correct?
For Read Only Properties
Public Property Get PropName() PropName = myPropName End Property
For Write only Properties
Public Property Let PropName(temp as Variant) myPropName = temp End Property
Include both Properties.
10) Do you have Apartment Threading for your object?
Fix - In the Project properties, insure the threading model is set for Apartment.
Hope that solves some common errors!
God Bless from Ryan S