Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create an access MDB programmatically

Status
Not open for further replies.

SimonTheSponge

Programmer
Feb 12, 2001
74
GB
Does anybody know if this is possible at all using ADO ?

I want the first run of my app to create an MDB and tables if not already in existence
 
Yes. Look up details of the ADOX ActiveX object. This will happily create an empty .mdb file and allow you to populate it with tables etc.

FYI the file doesn't even have to have the .mdb extension.



Bob Boffin
 
Thanks Bboffin, Have founbd a few threads that point the way. Any idea where I can obtain the adox control, it doesn't appear to be in MDAC 2.6, 2.7 or 2.8

Cheers
 
Another way is to use Access to create the tables etc etc though the Access GUI. Then upload the MDB file into the application's resource file using the IDE. At run time, if the DB needs to be created just copy DB part of the resource file onto the disk.

It is simple and very easy.

Greg.

"Life is full of learning, and then there is wisdom"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top