Solved

ado error

Posted on 2002-06-05
13
286 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now