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

Unrecognized Database Format

Status
Not open for further replies.

jlisota

Programmer
Mar 7, 2005
6
US
Ok here is the situation, the Application is written in VB 5.0 and is currently looking at an Access DB in Access 95 format. I am currently working on a project in which we need to update the Access Db and in order to do so we must upgrade the db to Access 2002. When we do this and run the application it comes back with the Unrecognized Database Format error. We have narrowed it down to a line of code where the message get generated which is the following:

DBSummary(i).Databasename = gHistPath

Can anyone point me in the right direction or possibly have an easy solution. We have also changed our reference from DAO 3.51 to DAO 3.6. Any ideas would be great.
 
That's not the line of code that's causing the error, rather it's the way that you've set up the database ahead of time. I'm sorry, I don't remember exactly what the fix is, but it has to do with making sure you're connecting to the later version of Access. You have to set a property in your code. I've seen this on here before, and ran across it myself 2 or 3 years ago, but can't put my finger on the exact solution. Maybe someone else can help. In any case, I hope I've given you a clue that may point you in the right direction.

HTH

Bob
 
what VB service pack's do you have installed ?


I had this problem a while back and it involved installing at least service pack 5 (now 6 is available) I had the problem when going from access 97 to 2000 but it could easly be the same for you.
 
Ok I have tried everything which was stated above but it appears that is not the problem. The line of code which I stated above is part of a DATA Control and for some reason it does not like that the database which we are pointing to is in access 2002.
 
I think that that is your problem. you can not use that control like that anymore.
From my first link you will need to try try something like this instead of setting the database name.

Code:
Option Explicit
Private daoDB36 As Database
Private rs As DAO.Recordset
Dim sPath As String

Private Sub Form_Load()
sPath = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set daoDB36 = DBEngine(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("Customers")
Set Data1.Recordset = rs
End Sub

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top