Is it possible to create a database at runtime I want to write a small app, that wiil need a new DB every year.
Maybe I could include a empty DB and use it as a template, making a copy of it every time a new DB is needed.
Any buddy got any advice??
Printable View
Is it possible to create a database at runtime I want to write a small app, that wiil need a new DB every year.
Maybe I could include a empty DB and use it as a template, making a copy of it every time a new DB is needed.
Any buddy got any advice??
Using DAO is very easy to create a new empty database:
First, add a reference to Microsoft DAO library 3.x (select the highest version)
Then use this:
Dim db As Database
Set db = Workspaces(0).CreateDatabase("C:\MyDB.mdb", dbLangGeneral)
This will create an empty database, it means you have to create Tables (with fields in it) also.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]