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!

Unrecognized data base format (Access 2000) 1

Status
Not open for further replies.

catfish

Programmer
Jul 5, 2000
2
US
I am susing VB6. When I create a database with Access 2000 and use it with VB6, bound, setting the RecordSource, I receive an error: Unrecognized data base format! It is ok under Access 97. Now What? Any suggestions?
 
If you are using an ADODC connection JET 3.51 will not work with Access 2000.&nbsp;&nbsp;Change the Provider to JET 4.0.&nbsp;&nbsp;Maybe this code will help:<br><br>&nbsp;Option Explicit<br>' Be sure to set a reference to the Microsoft ActiveX Data<br>' Objects 2.0 Library.<br>Private rst As New ADODB.Recordset<br>Private cn As New ADODB.Connection<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp;&nbsp;Dim strQuery As String ' SQL query string.<br><br>&nbsp;&nbsp;&nbsp;' First change the path to a valid path for your machine.<br>&nbsp;&nbsp;&nbsp;cn.ConnectionString = _<br>&nbsp;&nbsp;&nbsp;&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; & _<br>&nbsp;&nbsp;&nbsp;&quot;C:\Jon\CIS\Data Warehouse\db1.mdb&quot; ' &lt;-Change this path.<br><br>&nbsp;&nbsp;&nbsp;' Open the connection.<br>&nbsp;&nbsp;&nbsp;cn.Open<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;' Create a query that retrieves only four fields.<br>&nbsp;&nbsp;&nbsp;strQuery = &quot;SELECT&nbsp;&nbsp;x, y FROM xy &quot; ' Open the recordset.<br>&nbsp;&nbsp;&nbsp;rst.Open strQuery, cn, adOpenKeyset<br>&nbsp;&nbsp;&nbsp;' Set the DataSource to the recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top