开发者

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 ?


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.

http://support.microsoft.com/kb/194801

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜