Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get Err.Description

634 views
Skip to first unread message

Andrew HUANG

unread,
Nov 13, 2007, 10:14:00 AM11/13/07
to
Please advice me, how to get error description.

In my code bellow, only get err.number (-2147024894, 0x80070002), the
err.Description is empty.

dim objComponent
On Error Resume Next
Set objComponent =
CreateObject("VBNET.HowTo.CreateEnterpriseServicesComponents.Supplier")
if Err then
msgbox(Err.number & ":" & Err.Description)
End if

Richard Mueller [MVP]

unread,
Nov 13, 2007, 11:57:13 AM11/13/07
to
Andrew HUANG wrote:

If the Description property of the Err object is blank, there is no way to
retrieve it. You might check the Source property of the Err object. That's
the only other information I know of.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--


Andrew HUANG

unread,
Nov 13, 2007, 12:18:01 PM11/13/07
to
Thanks, Richard.

The Err.Source is blank as well. Would you know why they are blank?

Richard Mueller [MVP]

unread,
Nov 13, 2007, 1:00:28 PM11/13/07
to
I'm not familiar with the object, but I ran the code on a Vista machine with
VB.NET and a W2k machine without .NET. In both cases I got error number 429,
description "ActiveX component can't create object", and source "VBScript
runtime error".

Perhaps in your case the require object is installed on your machine, but it
is not designed to be accessed by a script so no error information is
returned. Just a guess.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

"Andrew HUANG" <Andre...@discussions.microsoft.com> wrote in message
news:ECCF8F89-51DF-4B25...@microsoft.com...

Andrew HUANG

unread,
Nov 13, 2007, 2:35:01 PM11/13/07
to
Just because there isn't
"VBNET.HowTo.CreateEnterpriseServicesComponents.Supplier" in you computer.

Alexander Mueller

unread,
Nov 15, 2007, 5:54:01 AM11/15/07
to
Andrew HUANG schrieb:

If error description is empty then likely because the text
isn't promoted by the raising component or because no text is
defined, which is not actually unusual.

The err-code 0x80070002 is the HRESULT COR_E_FILENOTFOUND
which maps to the Win32-error ERROR_FILE_NOT_FOUND and of
course means "file not found".

It doesn't say file isn't found of course ;-)

MfG,
Alex

Alexander Mueller

unread,
Nov 15, 2007, 5:58:30 AM11/15/07
to
Alexander Mueller schrieb:

Should read
It doesn't say, which file isn't found of course ;-)

Maybe the component
"VBNET.HowTo.CreateEnterpriseServicesComponents.Supplier"
isn't installed properly. Or a resource it relies on is missing.

MfG,
Alex

Andrew HUANG

unread,
Nov 15, 2007, 2:01:03 PM11/15/07
to
Thanks, Alex.

You're right, the component didn't install properly.

But my question focus on how to get the error description, because some
error descriptions are blank. My work is just to find which component didn't
registered properly.

Regards,
-Andrew

Alexander Mueller

unread,
Nov 16, 2007, 4:33:26 AM11/16/07
to
Andrew HUANG schrieb:

> Thanks, Alex.
>
> You're right, the component didn't install properly.
>
> But my question focus on how to get the error description, because some
> error descriptions are blank.

If the description is blank, it is blank, so all you have is the number.
You can check the documentation, if there is one, for the number, or
google, where a convertion to hex is likely to return more hits.

Most common practice is to reinstall or at least reregister the
component and hope it'll fix it.

> My work is just to find which component didn't
> registered properly.
>


Probably the one that goes by the ProgID
"VBNET.HowTo.CreateEnterpriseServicesComponents.Supplier"
or did i miss something?


MfG,
Alex

0 new messages