Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Method '~' of object '~' failed

Reply
 
Old 11-19-2008   #1 (permalink)
T. Valen


 
 

Method '~' of object '~' failed

A VB6 program I wrote accesses the AD and fails with

Method '~' of object '~' failed

on a set of PCs of ONE particular customer. Other customers don't seem
to have problems with that.

I googled and found that this might have to do with the MDAC version
differing between my development machine and the customers machine. So I
asked the customer to run the component checker, which I did, too.

I found we're both using the (apparently) correct version MDAC 2.8 SP1
ON WINDOWS XP SP2. The details of his XML-report showed that a few files
on the customers machine are in a slightly newer version (me:
2.81.1117.0, his: 2.81.1128.0 xpsp_sp2_gdr.061226-0034).

Question remains: I don't see how the MDAC version could have caused this.

Anyone got another idea what I could tell the user to try?

Thanks in advance!

Regards,
T.

My System SpecsSystem Spec
Old 11-19-2008   #2 (permalink)
Bob Barrows


 
 

Re: Method '~' of object '~' failed

T. Valen wrote:
Quote:

> A VB6 program I wrote accesses the AD and fails with
>
> Method '~' of object '~' failed
>
> on a set of PCs of ONE particular customer. Other customers don't seem
> to have problems with that.
>
> I googled and found that this might have to do with the MDAC version
> differing between my development machine and the customers machine.
> So I asked the customer to run the component checker, which I did,
> too.
>
> I found we're both using the (apparently) correct version MDAC 2.8 SP1
> ON WINDOWS XP SP2. The details of his XML-report showed that a few
> files on the customers machine are in a slightly newer version (me:
> 2.81.1117.0, his: 2.81.1128.0 xpsp_sp2_gdr.061226-0034).
>
> Question remains: I don't see how the MDAC version could have caused
> this.
>
> Anyone got another idea what I could tell the user to try?
>
Maybe try asking in a VB group? :-)

vbscript <> VB

Also, when you post to the VB group, show at least the line of code that
raises this error ... although a little context won't hurt.
In the meantime, you also might want to try perusing the results of this
google search:
http://www.google.com/search?sourcei...e%27+failed%22

--
HTH,
Bob Barrows


My System SpecsSystem Spec
Old 11-19-2008   #3 (permalink)
T. Valen


 
 

Re: Method '~' of object '~' failed

Bob, thanks for your - ljhwuohasuh - posting.
Quote:

> Maybe try asking in a VB group? :-)
I may be wrong, but I thought the letters VB in this group name would
stand for the same letters that VB alone stand for.
Furthermore I believe the issue is probably reproducible with VBS.

Quote:

> vbscript <> VB
Not really.

Quote:

> Also, when you post to the VB group, show at least the line of code that
> raises this error
If you demand for it:

Set oRecordSet = CreateObject("ADODB.Recordset")
Set oConnection = CreateObject("ADODB.Connection")

Set oAD = GetObject(Provider) 'Determine the global catalog path
For Each oGlobalCatalog In oAD
strADsPath = oGlobalCatalog.ADsPath 'get last one
Next
oConnection.Provider = "ADsDSOObject" 'Initialize the ADO object
oConnection.Open "ADs Provider" 'The ADSI OLE-DB provider

'Create the search string

strQuery = "<" & strADsPath & _
">;(&(objectclass=computer)(samaccountname=" & sUserName &
"$));samaccountname,cn,distinguishedName;subtree"


(with strQuery =
<GC://domain.de>;(&(objectclass=computer)(samaccountname=D1137$));samaccountname,cn,distinguishedName;subtree)

Quote:

> ... although a little context won't hurt.
What else would you need what's not already said?
Executing the query results into the mentioned error on some machines.

Quote:

> In the meantime, you also might want to try perusing the results of this
> google search:
> http://www.google.com/search?sourcei...e%27+failed%22
Thank you for believing that the idea the issue might have to do with
MDAC is based upon my own skills of debugging MS ADO internals. I'm
afraid this isn't so. I was just following the exact search reaults that
google gave me.
My System SpecsSystem Spec
Old 11-19-2008   #4 (permalink)
Bob Barrows


 
 

Re: Method '~' of object '~' failed

T. Valen wrote:
Quote:

> Bob, thanks for your - ljhwuohasuh - posting.
Oooh! What's "ljhwuohasuh"? Nothing bad, I hope ...
My turn to go to google ...
Quote:

>
Quote:

>> Maybe try asking in a VB group? :-)
>
> I may be wrong, but I thought the letters VB in this group name would
> stand for the same letters that VB alone stand for.
Relevance? :-)
Quote:

> Furthermore I believe the issue is probably reproducible with VBS.
>
Maybe, maybe not.
I'm not sure why you are trying to shoehorn this into a vbs issue. Why
not simply post to a VB group and stop wasting time? Do you want to get
an answer to your question or argue about where the question belongs?
:-)
I'm not trying to reprimand you: I'm just saying you will be more likely
to encounter someone who can answer your question in a VB group.
Quote:

>
Quote:

>> vbscript <> VB
>
> Not really.
No ... really! :-)
They are not the same, beyond some of the syntax used ... really, that
is the only place where they are similar. Different runtime engines,etc.
Quote:

>
>
Quote:

>> Also, when you post to the VB group, show at least the line of code
>> that raises this error
>
> If you demand for it:
If "demand" is equivalent to "request", then yes, I demanded it :-)

<snip>
Quote:
Quote:

>> ... although a little context won't hurt.
>
> What else would you need what's not already said?
Well, I "demanded" to see _the_ line of code that threw the error. By
"context", I meant a little context around the line of code: meaning a
few of the lines leading up to the line that throws the error rather
than simply just the line itself. You did that without realizing what I
was asking for, so I congratulate you. Many would have either posted the
single line of code that I asked for ... or worse: posted 2000 lines of
code just to make sure the lines causing the problem were included.

Quote:

> Executing the query results into the mentioned error on some machines.
Do you use oRecordSet.Open or set oRecordSet =oConnection.Execute to run
it? Just in case it makes a difference to the person who actually has
the answer for you.
Quote:

>
>
Quote:

>> In the meantime, you also might want to try perusing the results of
>> this google search:
<snip>
Quote:

> Thank you for believing that the idea the issue might have to do with
> MDAC is based upon my own skills of debugging MS ADO internals.
good one :-)

I'm afraid I have not encountered this error so I am not going to be of
any help beyond providing commiseration ... and I really do sympathize:
dll Hell is .... well ... Hell!

--
HTH,
Bob Barrows


My System SpecsSystem Spec
Old 11-19-2008   #5 (permalink)
T. Valen


 
 

Re: Method '~' of object '~' failed

> Oooh! What's "ljhwuohasuh"? Nothing bad, I hope ...

No. Could have been "piugpiqwipguz !!!!", too. It's what I am typing in
when I shouldn't use bad words. ;-)

Just make a game of it and make it an acronym for something that pleases
you. Start with something easy like: "disafg" (for example: "Damn, I'm
such a funny guy!")

Quote:
Quote:
Quote:

>>> Maybe try asking in a VB group? :-)
>> stand for the same letters that VB alone stand for.
> Relevance? :-)
Your parents were lawyers, weren't they? ;-)

Quote:

> I'm not sure why you are trying to shoehorn this into a vbs issue.
Because I know of active participants in this group that know what
they're talking about. That's priceless and can't be found everywhere on
the net! ;-)

Quote:

> Why not simply post to a VB group and stop wasting time?
I'm going to do that.

But I'll come back to you and tell you the results when I'm done with
this! ;-)

Quote:

> Do you want to get
> an answer to your question or argue about where the question belongs?
Well, yes, let me put this way: "Do you want to answer my posting or
argue where the question belongs?" ;-)

Quote:
Quote:
Quote:

>>> vbscript <> VB
>> Not really.
> No ... really! :-)
> They are not the same, beyond some of the syntax used ... really, that
> is the only place where they are similar. Different runtime engines,etc.
The point is that the issue itself has nothing to do with VB or VBS
itself but is a ADO-problem. Where should I post it? A VB-board is as
good or bad as a VBS is. I'll go ahead and try
microsoft.public.vb.database.ado but I'm not sure that that one is better.

Quote:
Quote:
Quote:

>>> Also, when you post to the VB group, show at least the line of code
>>> that raises this error
>> If you demand for it:
> If "demand" is equivalent to "request", then yes, I demanded it :-)
Sorry, I'm no native English speaker. I meant "request" and I realized
that "demand" means something different.

Quote:
Quote:

>> Executing the query results into the mentioned error on some machines.
> Do you use oRecordSet.Open or set oRecordSet =oConnection.Execute to run
> it? Just in case it makes a difference to the person who actually has
> the answer for you.
Damn, I just found I missed to post this line in my last posting. Sorry:

Set oRecordSet = oConnection.Execute(strQuery) 'Execute the query

Quote:

> I'm afraid I have not encountered this error so I am not going to be of
> any help beyond providing commiseration ...
But thank you for that. It feels so good. ;-)
My System SpecsSystem Spec
Old 11-19-2008   #6 (permalink)
Bob Barrows


 
 

Re: Method '~' of object '~' failed

T. Valen wrote:
Quote:

>
> The point is that the issue itself has nothing to do with VB or VBS
> itself but is a ADO-problem. Where should I post it?
Now that is a good point. microsoft.public.data.ado springs to mind ...
that is, if it is an ADO problem. You expressed doubts about that
yourself.
Quote:

> A VB-board is as
> good or bad as a VBS is. I'll go ahead and try
> microsoft.public.vb.database.ado but I'm not sure that that one is
> better.
>
Right - you might want to crosspost to .general as well, just in case it
really isn't an ADO issue.

--
HTH,
Bob Barrows


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
ListInstalledInstance method of SQLDMO.SQLServer2 object VB Script
438 Object doesn't support this property or method VB Script
Destroy a Timer object in its callback method .NET General
Method invocation failed because [System.String] doesn't contain a method PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46