I have an Access97 application where I create databases in code using the CreateDatabase method. I then create and populate tables in these databases.
The databases are are then written to CD and distributed to users in different states. They are not actually opened with a user interface at any point during the creation - it all happens with code.
The result of this is that there are two Access system tables which are not created in the databases. These are:
MSysModules
MSysModules2
When you try to open one of these databases on CD, Access tries to create these tables on the fly and when it fails to do so will not open the database. It seems you cannot open a database that is readonly when these tables are missing.
Is there a way I can force the creation of these system tables in code without the adding a step to the creation process where the databases are opened one at a time using the Access UI before they are written to CD?
It is not a big deal because the users can copy the databases to a PC and turn off the readonly attribute and everything is fine or they can attach to all of the tables using a blank database. However, because I get complaints, I would like to fix this in code.
Thanks, Blaine
The databases are are then written to CD and distributed to users in different states. They are not actually opened with a user interface at any point during the creation - it all happens with code.
The result of this is that there are two Access system tables which are not created in the databases. These are:
MSysModules
MSysModules2
When you try to open one of these databases on CD, Access tries to create these tables on the fly and when it fails to do so will not open the database. It seems you cannot open a database that is readonly when these tables are missing.
Is there a way I can force the creation of these system tables in code without the adding a step to the creation process where the databases are opened one at a time using the Access UI before they are written to CD?
It is not a big deal because the users can copy the databases to a PC and turn off the readonly attribute and everything is fine or they can attach to all of the tables using a blank database. However, because I get complaints, I would like to fix this in code.
Thanks, Blaine