Click to See Complete Forum and Search --> : VB6 and Access2000


Ghaz74
April 20th, 2001, 09:22 AM
i get an error message "Unrecognized database format" when i try to open database in access2000 from VB6 program.
I don't have this problem if the database is converted into Access97. How do i solve this problem. please help

Cubbie
April 20th, 2001, 09:39 AM
Are you using DAO or ADO? In any case, you need to install visual studio service pack 5. I know that allow yous to connect with Access 2000 via DAO 3.6. Not sure about ADO. If you're using a data control there will be an Access 2000 option after you install the service pack. Here's some sample DAO code:


Dim ws as Workspace
Dim db as Database
Dim rs as Recordset
Dim strSql as string

strSql = "Select * from Exception"

' Open workspace, database, recordset
set ws = DBEngine.Workspaces(0)
' Password protected
set db = ws.OpenDatabase"I:\NICP\01Apps\Vb\Labor\Labor.mdb", false, false, "MS Access;pwd=password")
set rs = db.OpenRecordset(strSql, dbOpenDynaset)
'Don't forget to set to nothing when finished

softweng
April 20th, 2001, 10:13 AM
You need mdac 2.5 for access 2000
http://www.microsoft.com/data/download.htm

Kris
Software Engineer
Phoenix,AZ

Cubbie
April 20th, 2001, 10:29 AM
That's correct Kris. I had forgotten that I installed that also a while back.

ecannizzo
April 20th, 2001, 10:31 AM
You need to connect using the Jet 4.0 instead of Jet 3.51...

Erica