Making mdb read-only after appending tables

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I have created an Access mdb(2003) through VB6 code using ADOX (2.8).
All tables in this db are being populated through code in the front
end. (Data for this is coming from flat files.)

The mdb has to be deleted after processing is finished. I am able to
open the db and modify data even as the program is running. I need to
find a way to prevent a user from opening and modifying it.

I tried created the tables with the property: newTbl.Properties("Jet
OLEDB:Table Hidden In Access") = True
But the tables still show if with the "Hidden" option checked and data
can be modified.

Using "Access.Application.SetHiddenAttribute acTable, strTableName,
True" also has the same result.

I cannot define the connection object for the ADOX Catalog as
read-only, since the tables are being created and appended to the mdb
dynamically. Is there any way by which I can make the mdb itself
hidden, or make the mdb read only after all tables are appended and
populated?

I did consider creating users for the database like this and then
appending it to a group:
newCat.Users("Admin").SetPermissions strDataBase, adPermObjDatabase,
adAccessGrant, adRightRead
But it throws runtime error 3265. More over, there are really no users
for this database except for the front end, and that too only for the
period that the program runs. The mdb file will be deleted at the end
of the whole thing.

I'm new to programming using Access. Any help and patience with this is
highly appreciated.

Thanks in advance,
Anu

.



Relevant Pages

  • Re: Create Database
    ... Try ADOX: ... what is the best way to create a database and the tables (mdb) without ... or i have to use always the CDao.. ...
    (microsoft.public.vc.mfc)
  • (no subject)
    ... - LDB locking which a persistent recordset connection fixes ... New format of Access 2000 MDB ... Place backend MDB on the root of the network share rather than several folders down ... Subdatasheets are a new feature in Access 2000 Therefore, you are more likely to notice this behaviour after you convert a database from an earlier version. ...
    (comp.databases.ms-access)
  • Re: temp db
    ... If the database is not in use, you can create a copy just by copying the MDB ... The purpose is to create a temp db for all the ... ' This subroutine illustrates how to use a temporary MDB in your app. ...
    (microsoft.public.access.formscoding)
  • RE: Access to Access Automatic Updates
    ... Then navigate to the database from the File Open dialog and open it. ... You will need to do it for mdb that has tables you need ... MS Office Master 2000 ed. ... you will need to create a form that opens on ...
    (microsoft.public.access.externaldata)
  • RE: Access to Access Automatic Updates
    ... MS Office Master 2000 ed. ... Then navigate to the database from the File Open dialog and open it. ... You will need to do it for mdb that has tables you need ... you will need to create a form that opens on ...
    (microsoft.public.access.externaldata)