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
Solved

ado error

Posted on 2002-06-05
13
289 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

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