When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Published: Monday, May 03, 1999

Checklist for VB Component Trouble Shooting

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!

- continued -

Common Errors & Fixes

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?
Fix -

    Public Sub onStartPage(sc as ScriptingContext)
        mySC = sc
    End Sub

3) Did you dim your objects properly?
Fix - Dim myResponse as Response

4) Is the ASP code correctly refrencing the DLL (is it the same project/class name)

Fix - CreateObject("myProject.myClass")

5) Do you have multiple components with the same Project/ClassName registered using regsvr32?
Fix - 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?
Fix -
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

For Read/Write
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

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.

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article