Solved

ado error

Posted on 2002-06-05
13
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

688 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