How to open MS-Access 2.0 database using VB

Posted on 2002-05-19
Medium Priority
Last Modified: 2008-02-01
I have 1 access 2.0 database file which will used as main database of my simple program. I use VB 5.0.
I want to keep it's version, n dont want to convert the database to next versions.
When i try to open the xx.mdb file using office 97 and office2000, it shows error :

1. Record(s) cannot be read; no read permission on 'MSysObjects'.


2. Record(s) cannot be read; no read permission on 'MSysACEs'.

3. You can't make changes to the database objects in then database 'xxx.mdb'
   The database is created in an earlier version of Microsoft Access. Etc ......

I had tried to open it with excuslive open, and it didn't work.

When i use VB and ADO 2.5, is shows error (debug) :

Record(s) cannot be read; no read permission on 'YYYY'.

Note : YYYY is a table in that db.

Any pro can help me ?

Question by:BetaTest

Expert Comment

ID: 7020820
hi beta,

There are two options
1)convert the database to latest version
2)Use odbc driver
   'write this code in vb
   dim cn as adodb.connection
   set cn=new adodb.connection
   cn.Open "dsn=dsnname;uid=;pwd=;"
   a)incase u want to make change to the database then    

    'u    have to change it to current version and then  
    ' make changes

Author Comment

ID: 7021021
Thx harsh008_k,

I found no difficulty to convert it into newer version.
I dont want to change it and want to keep it's version.

What makes me confused is :
i can open that db, although it shows warnings. BUT, when i checked it's password, but doesn't have it. Perhaps this version doesn't support password protected feature.
But when i open it using visual basic, it shows error :
no enough permission. Weird huh ??? :)
So any expert can help me ?


Expert Comment

ID: 7021082
use odbc,dont use the password
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions


Expert Comment

ID: 7026549
Try using the reference -- DAO 2.5/3.5 Compatability Library

If you only need to manipulate the db and never open it in MS Access this should work.

Global gstrInputDatabaseName As String
Global InputDataBase As Database

'Put in your form load event or wherever
gstrInputDatabaseName = "C:\YOUR_DB.mdb"

'Change the status of the input database from read-
'only, hidden, etc. to normal

SetAttr gstrInputDatabaseName, vbNormal
Set InputDataBase = Workspaces(0).OpenDatabase(gstrInputDatabaseName)

'Then perform your db calls

LVL 49

Expert Comment

ID: 7817906
Hi BetaTest,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

BetaTest, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
DanRollins -- EE database cleanup volunteer

Accepted Solution

SpideyMod earned 0 total points
ID: 7909736
per recommendation

Community Support Moderator @Experts Exchange

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As a person who answers a lot of questions, I often see code that could be simplified, made easier to read, and perhaps most importantly made easier to maintain if the code was modified to use the Select Case statement. This article explains how to…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question