![]() |
|
|
Published: Monday, May 03, 1999 By 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?
4) Is the ASP code correctly refrencing the DLL (is it the same
project/class name)
Fix -
5) Do you have multiple components with the same Project/ClassName registered using regsvr32?
6) If you are using ADO, have you include the ActiveX Data Objects reference in your program?
7) If you are using ADO, are you using CreateObject("ADODB.Connection") instead of set?
8) Is PWS/IIS running?
9) Are your Property statements correct?
Public Property Get PropName()
PropName = myPropName
End Property
For Write only Properties
Public Property Let PropName(temp as Variant)
myPropName = temp
End Property
For Read/Write
10) Do you have Apartment Threading for your object?
Hope that solves some common errors!
This article was written by
Ryan S.
Ryan has been a computer programmer
in the loosest sense since the age of 8. He has been working with ASP
since the age of 13, when it first came out (that he knows of), and is
somewhat advanced at it.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||