-3

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?

3
  • 1
    You're asking a bunch of questions here. And some of your questions are unclear because it might or might not be related things you wrote earlier in your post. I suggest you pick one thing to ask a focus on asking it as clearly as possible; providing all relevant information (not side questions) to that one question you picked. Commented Dec 16, 2016 at 23:49
  • what has renaming access tables to do with Delphi ? In Access you have the option to export the table anywhere you wish. Commented Dec 17, 2016 at 5:41
  • 1
    Possible duplicate of Delphi: Creating Access DB (.mdb) without Ms Access Commented Dec 17, 2016 at 6:45

2 Answers 2

-1

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.

Sign up to request clarification or add additional context in comments.

Comments

-2

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)

6 Comments

I don't know how you're able to answer such a poor question. Let me point out that the question asks how to do whatever OP is trying to do "in Delphi". Until the question is clarified it seems counterproductive trying to answer it.
His is a bunch of questions. His main question is how to get tables from template to new DB if I am not mistaken :)...
Congratulations on your ability to read his mind. Including reading that "in Delphi" was a complete accident and not because he perhaps wants to achieve his goal programatically - as in without manual user interaction from Access. :) (Note, I'm not saying you're wrong in your "mind-reading"; just that it's a little presumptuous, and it would be better to give OP the time to fix his question so we don't get a bunch of wild-guess answers.)
This question is tagged Delphi, which means it is asking about how to do this in code. It also clearly states that in the final sentence of the post, which says Any way to do this in Delphi. It's not asking how to do it in Access, or it would not have the Delphi tag or that final sentence. You should read the question before answering it, and if you don't understand it then just move on.
I'm not debating this with you. The body of the question (where the detail is) and the tag clearly says in Delphi. I think you should read the entire post, instead of just assuming that the title contains everything. There is a reason that this site does not contain only titles to questions and requires content in the body of the post. You should learn to actually read the question, instead of assuming that you can glean the entire meaning from the few words in the title.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.