Solved

ado error

Posted on 2002-06-05
13
288 Views
Last Modified: 2010-05-02
Hi !!
Iam getting the following error when i execute a command through command object...
Vb 6.0
Ado 2.6
Dim a As New ADODB.Connection
Dim b As New Command
a.Open "dsn=pat;uid=pat;pwd=xxx;"
b.ActiveConnection = a (While executing this iam getting error)

Error :
Run time error 430
Class does not support Automation or does not support expected interface

Can you help me ???

0
Comment
Question by:ashok73
13 Comments
 
LVL 39

Expert Comment

by:appari
ID: 7058622
try
set b.ActiveConnection = a
0
 

Author Comment

by:ashok73
ID: 7058691
Iam using NT 4.0 4.72.3110.8
Is there any version related problem for using Ado 2.6 ..
I tried in Win2k it is working....
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7058747
Got this error (but for ado 2.5) for 3 out of 1500 clients.
So 1497 were working correctly, 3 did not

when those 3 reinstalled their PC (incl the OS) it works correctly.

We have not been capable to find the offending program

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 4

Expert Comment

by:gencross
ID: 7059038
See if this works...

Dim b As New ADODB.Command

Instead of just dimming it as command.

0
 
LVL 5

Expert Comment

by:rpai
ID: 7059232
Try this:-
Dim a As ADODB.Connection
Dim b As ADODB.Command

Set a = New ADODB.Connection
Set b = New ADODB.Command
a.Open "dsn=pat;uid=pat;pwd=xxx;"
Set b.ActiveConnection = a
0
 
LVL 4

Expert Comment

by:gencross
ID: 7059272
rpai's code is really the best way to do what you are doing.  You shouldn't dim an object as new.  You should dim it then set it as new.  However, I don't think this is the cause of your problem.  I think the cause of the problem is that you did not dim the Command as ADODB.Command.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7059413
Please maintain your open questions:
Questions Asked 38
Last 10 Grades Given B B B A A A A B A A  
Question Grading Record 30 Answers Graded / 30 Answers Received

Anthony
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7061269
ashok73 code is correct. We implemented it that way too and it works for 1497 out of 1500 clients. There is just some program that corrupts MDAC
0
 
LVL 3

Expert Comment

by:PNJ
ID: 7089849
A definite problem exists with MSADO15.DLL. There are two versions, one dated 27/11/2000 (2.50.4403.9) and the other in 26/7/2000 (2.51.5303.0). Which is odd because the later versions is on an earlier file. The November one works fine. It seems to be a problem when the PC is upgraded from Windows 95 to Windows 2000, or when creating a new W2K system from "scratch". This screwed us up for ages 'till we found out what it was.

However, rather annoyingly, the July one works fine in most situations (I've just checked on one of our systems that's using the July version). So it's possible that there's another DLL involved.

Either way, it's worth investigating.
0
 

Expert Comment

by:srinivasanmr
ID: 7109895
try for this

Dim b As New ADODB.Command

instead of

Dim b As New Command

i think i will work


0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7522855
Dear PNJ
I've rejected your proposed answer as Experts Exchange holds an experiment to work without the answer button.

See: <http://www.experts-exchange.com/jsp/communityNews.jsp>
Paragraph: Site Update for Wednesday, November 06, 2002

By this rejection the Asker will be notified by mail and hopefully he will take his responsibility to finalize the question or post an additional comment.
The Asker sees a button beside every post which says "Accept This Comment As Answer" (including rejected answers) -- so if he/she thinks yours is the best, you'll be awarded the points and the grade.

EXPERTS: I will return in seven days to close this question.
Please leave your thoughts and recommendations here

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Thanks !

kodiakbear
Experts Exchange Moderator
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 7897112
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and points NOT refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

twalgrave
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7941778
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question