Solved

ado error

Posted on 2002-06-05
13
287 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio search word table and return Cell index 8 49
how to know if my Checkbox is True in VB6.0? 9 40
vbModal 12 35
Set email body to html using vbscript 6 26
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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 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…

895 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

14 Experts available now in Live!

Get 1:1 Help Now