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. Change the Provider to JET 4.0. Maybe this code will help:<br><br> 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> Dim strQuery As String ' SQL query string.<br><br> ' First change the path to a valid path for your machine.<br> cn.ConnectionString = _<br> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _<br> "C:\Jon\CIS\Data Warehouse\db1.mdb" ' <-Change this path.<br><br> ' Open the connection.<br> cn.Open<br> <br> ' Create a query that retrieves only four fields.<br> strQuery = "SELECT x, y FROM xy " ' Open the recordset.<br> rst.Open strQuery, cn, adOpenKeyset<br> ' Set the DataSource to the recordset.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.