VB 6.0 debugging breakpoint doesn't hit

I have a VB 6.0 Project having Class (cls) files. When I start (Debug) my project, and try to execute following statement in Classic ASP page,

Set objMyObject = Server.CreateObject("ProjName.ClassName")

No breakpoint is hit and following error occurs.

Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object

While if I use the same statement in another VB Project (test project) then breakpoint hits with no error.

Can anyone help ?

-------------Problems Reply------------

Well you are trying to create an instance of a COM object with the name 'ProjName.ClassName' - which is unlikely to be a real COM object.

Either your COM class needs to be one that has been registered in Windows, or it needs to be a class defined within your VB project.

The example in MSDN is:

Sub CreateADODB()
Dim adoApp As Object
adoApp = CreateObject("ADODB.Connection")
End Sub

Where ADODB.Connection is a COM class that has been previously registered in Windows. The code you have provided above is trying to instantiate a non existant class (unless it is already within the same VB project).

You say that the other project this works, then I will hazard a guess that the test project has a class called ClassName.

Ok -Updated. The error code is not 'DLL Missing' - It is likely to be some reason why the COM object could not be instantiated. The following Microsoft support page suggests some reasons and ways of tracking down the problem. Its likely to be some sort of missing dependency to the DLL.


Category:vbscript Views:0 Time:2011-07-22

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.187 (s). 11 q(s)