Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO/automation error 1

Status
Not open for further replies.

nhc

Programmer
Apr 3, 2000
10
AU
Hi, <br><br>When my program attempts to open a recordset through an ADO connection I get a 430 automation unsupported error. <br><br>My development environment is vb6 on win2k, and the program runs fine here. <br>The problem occurs when I attempt to run it in win98. I have installed dcom98 and the setup installs mdac... <br><br>The following is a snippet of my code, the line that causes the error is the rsttemp.open line. <br><br>' begin code snipped <br>Dim rstTemp As New ADODb.Recordset <br>Dim strQuery As String <br><br>Set retrieveAllObjects = New Collection <br><br>' create query string <br>strQuery = &quot;SELECT rxObject.objectId,rxObject.objectType,&quot; & _ <br>&quot;rxObject.objectParent,rxObject.objectNumber,rxObject.objectDesc,&quot; & _ <br>&quot;rxObject.objectData, rxObject.rxid, rxobject.rxchannel, rxobject.rxtype,&quot; & _ <br>&quot;rxobject.objectState FROM rxObject&quot; <br><br>' open recordset <br><b>rstTemp.Open strQuery, cn1 , adOpenStatic, adLockOptimistic</b><br><br>' end code snipped <br><br>It's an Access97 database. <br><br>Private cn1 As ADODb.Connection <br><br>ConnectionString =&quot;Provider=Microsoft.Jet.OLEDB.3.51;Data Source=&quot; & db1Name<br><br>I can give more information if it is needed. I you can help me or point me in the right direction I would be very greatful. <br><br>Thanks in advance, <br><br>Nick Clark
 
<br>If what you entered above is the code that you are using in your application, line for line, then <u>it cannot possably work</u> !<br><br>The line ...&nbsp;&nbsp;<br><br><b>rstTemp.Open strQuery, cn1 , adOpenStatic, adLockOptimistic</b> appears before the data source (I assume it's cn1) is ever opened !<br><br>Typically it's the mode value that is used used to open the data source that causes these kinds of errors.<br><br>Try opening the data source before opening the recordset.<br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Sorry,<br><br>The code finished at:&nbsp;&nbsp;end code snipped <br><br>I forgot to say that these are my connection details, and I should have put them first in the post.<br><br>So I do in fact open the connection first. I have sinc e seen another post similar to mine(if not the same).<br>The problem and solution there was that the deployment wizard packages ado 2.0 by default where is I was using 2.5 and this c auses the problem. When ado 2.1 ( in his case) was installed on the w95 system it fixed the problem.<br><br>However, I changed the reference in my project to ado 2.0 and it still works fine in w2k so I not sure if that will fix my problem. I still need to check it in w98 though.<br><br>If you have any more ideas please tell me.<br><br>Nick.
 
Hi Nick,
Have you solved this problem?
I am facing the same.


RR
 
Hi,

I have fixed this problem. It is simply that VB will always package ADO2.0 with a program regardless of what version your program uses. The best solution is to go to microsoft and download the latest version of mdac_tye.exe. Then locate this on your harddisk (should be under VB somewhere) and replace it. Then when you package up your program it will use the correct version.

Hope this helps.

Cheers,

Nick

Nicholas Clark
nhc@operamail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top