Set RS = New Recodset

Dim Con As ADODB.Connection
Dim RS As ADODB.Recordset

Set Con = New ADODB.Connection
Set RS = New ADODB.Recordset

Works fine on my box but when I try installing on another box ( 2 so far ) I get "Run Time Error 430" "Class does not support..." when the code hits the last line above. I reinstalled, reinstalled Data Objects re-registered all the active-x dll's and ocx's.






LVL 1
Neal HartmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cdlovesCommented:
why dont you try this?

Dim con as new ADODB.Connection
Dim Rs as new ADODB.Connection

you dont have to use set statements, this could avoid the error.
0
Neal HartmanAuthor Commented:
Dim Cmd1 As Command

Con.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
    & App.Path & "\FTPxfer.mdb;Persist Security Info=False"

Con.Open

Set Cmd1 = New ADODB.Command

Cmd1.ActiveConnection = Con
Cmd1.CommandText = "SELECT * FROM Users"

Set RS = Cmd1.Execute()

Now I get a Run Time Error 13 - Type Mismatch on the last line above.
0
SonalCommented:
try executing your query using
rs.open method..
See if the same error persist..

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

cdlovesCommented:
sonal is right.  dont try to use "set" statements with ADO.

rs.open "select * from users",cn,2,2

where cn is your ADODB.Connection

hope this will help.

2,2 are constants of ADODB
0
paulchouCommented:
I believe cdloves means
Dim con as new ADODB.Connection
Dim Rs as new ADODB.Recordset


0
gonzo031Commented:
Dear rmcquade:
I think that In your code only add the line indicated:

Dim Cmd1 As Command

Con.ConnectionString = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
    & App.Path & "\FTPxfer.mdb;Persist Security Info=False"

Con.Open

Set Cmd1 = New ADODB.Command

Cmd1.ActiveConnection = Con
Cmd1.CommandText = "SELECT * FROM Users"
This line----------
cmd.CommandType =adCmdText
------------------------
Set RS = Cmd1.Execute()

0
Neal HartmanAuthor Commented:
No matter which way I do it I get either of the above Run Time Errors. These servers are also running Lotus Domino 5.0 (NT Server 4.0 SP5), would that affect it?

0
Vin32Commented:

1. what are you coding : Standard EXE/ActiveX EXE/ActiveX DLL

2. Are you making a package for the other machines?

3. If your code is in an ActiveX component, what is the Compatibility of the Project? (see Project -> Properties)

If you provide the answers to these, then I may be able to help you ...

0
Neal HartmanAuthor Commented:
1. Standard EXE
2. Yes
3. N/A


I have got this to run on only one of four servers so far. The other three are about to get an "Order of Protection" out on me.
0
Jeremy_DCommented:
Not using the Set statement is nonsense. Using it is generally considered better (faster) practice, and even if you would use Dim As New you'd have the same error.

This sounds like a typical ADO Dll Hell problem. What version of VB and ADO are you using? And what service-packs? Make sure these are updated.

Also, the one machine it works on, is that your development box? What's difference between that one and the other ones? (Are all boxes NT?)

You say "I reinstalled, reinstalled Data Objects". It seems wise to me to do this the other way around (first MDAC, since this is your dependency, then your app). Did you get errors when (re)installing, or only on running the App?

Don't know about Lotus Domino. Do you have a test-box? Try installing on a clean NT Server.
0
Neal HartmanAuthor Commented:
I think you on the right track about the DLL's. I downloaded a Comapnant Checker from Microsoft. It says I'm running version 2.5 of the Data Access Componants. The machine I just installed it on is running version 2.1.xxxxx the latest available from on Microsofts MDAC download page. I can't figure out how I got 2.5.
0
Neal HartmanAuthor Commented:
That was it. I recompiled using ver 2.1 and it works fine. Jeremy, answer the question and I will send you the points.
 
0
Jeremy_DCommented:
OK, rmcquade, here's the answer again for completeness. BTW, you should be able to grade a comment as an answer.

---------------------------------------
Not using the Set statement is nonsense. Using it is generally considered better (faster) practice, and even if you would use Dim As New you'd have the same error.

This sounds like a typical ADO Dll Hell problem. What version of VB and ADO are you using? And what service-packs? Make sure these are updated.

Also, the one machine it works on, is that your development box? What's difference between that one and the other ones? (Are all boxes NT?)

You say "I reinstalled, reinstalled Data Objects". It seems wise to me to do this the other way around (first MDAC, since this is your dependency, then your app). Did you get errors when (re)installing, or only on running the App?

Don't know about Lotus Domino. Do you have a test-box? Try installing on a clean NT Server.
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.