Creating a access db from a template

127 Views Asked by At

I have an access db template. i want to copy that template and rename table1 in the template as table1 already contains certain fields

Also is there any way to copy table1 and create a table2, rename it and keep the fields in table1.

Any way to do this in Delphi?

2

There are 2 best solutions below

6
On

In Access : Right click on the table and select "Export" There you have the option to export the table to another Access database.

Edit : As for Delphi,yes it is possible. That would require creating the database and the tables (all in code). You can find examples here on SO on how to do that (example : Delphi: Creating Access DB (.mdb) without Ms Access)

0
On

In the Delphi IDE, locate the 'Import Component' or 'Import Type Library' option, and then import the "Microsoft ActiveX Data Objects (Multi-Dimensional)" type library. (I appear to have versions 2.8 and 6.0 available on my machine.) The components in the resulting ADOX_TLB.pas unit should provide you with the means to do what you describe.