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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database access problem upon upgrading from Office97 to Office2000

Status
Not open for further replies.

Brendan

Programmer
Aug 9, 1999
5
0
0
AU
Visit site
Code fragment:<br>
<br>
Public dbDynamic As Database<br>
Public recCustomers As Recordset<br>
<br>
Set dbDynamic = OpenDatabase("c:\db1.mdb")<br>
Set recCustomers = dbDynamic.OpenRecordset("Tcustomer")<br>
<br>
<br>
Giday,<br>
I'm programming in VB6 and had Office97 installed which the above code worked fine. However, after installing Office 2000, which meant upgrading the Access Database file, I get the following error message when it executes the 'Set recCustomer' line:<br>
<br>
"Unrecognized database format 'c:\db1.mdb'"<br>
<br>
Does anyone know why this error occurs and how I can get around it?<br>

 
I support a Mission Critical Database application for a living and know something about drivers/databases..It appears that the database internal system structure changes with drivers...In your situation, I would -<br>
1) add a new data form with the form wizard. Select 'ADO Code', not 'ADO Data control'..This will provide you with a lot of good code to cut and paste. You could also use the ADO control' on a form and build the connection string in the 'custom' property.<br>
2) Examine the actual structure with 'visdata' (ships w/vb)<br>
<br>
Did you convert the database with access to be compatible with the new drivers? If not, you may want to try that (back up the database!)...You may want to use ODBC, also.<br>
ODBC is a piece of cake, don't let the name scare you!
 
Giday wish3,<br>
<br>
Thanks for the advice. I have since gone back to Office 97 for the time being, however I will look at the 'wizards' code later next week. <br>
<br>
Cheers<br>
<br>
Brendan<br>
(Australia)
 
If you want to use DAO for database connectivity to Access 2000, you must have DAO 3.6
 
thanks spacey,<br>
<br>
will look into the DAO 3.6 <br>
<br>
<br>
regards<br>
<br>
Brendan<br>
(Australia)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top