creating Access Database

Please discuss general Delphi programming topics here.

creating Access Database

hey guys

please help me out with this one. I am trying to create an Access datadase using Delphi. I found this set of instructions :

1. Select Project | Import Type Library
2. Choose "Microsoft ADO Ext 2.x for DDL and Security (Version 2.x)"
3a. Change "TTable" to "TADOXTable"
3b. Change "TColumn" to "TADOXColumn"
3c. Change "TIndex" to "TADOXIndex"
3d. Change "TKey" to "TADOXKey"
3e. Change "TGroup" to "TADOXGroup"
3f. Change "TUser" to "TADOXUser"
3g. Change "TCatalog" to "TADOXCatalog"
4. Press Install button (rebuilding packages)
5. Press OK once and Yes twice
6. File | Close All | Yes

I went to Components, and selected the Import Components, and then selected Import Type Library, after which i selected as mentioned in the 2nd step but then it does not let me change the names ... and it also doesnt have an install button. Please tell me whether i did the correct thing, and acccording to instructions this procedure will install 7 new components, but the way I do it nothing gets installed. please do help me out here. I am using Borland Delphi 2005.
if any other way to create a database do let me know.

Thank you,
Kapilshah
Active Member

Posts: 5
Joined: February 2nd, 2007, 9:30 pm

This procedure is for Delphi versions prior to 2005.

I think you have to write the component wrappers by yourself.
Kambiz

Kambiz

Posts: 2424
Joined: March 7th, 2003, 7:10 pm

Try this

I have used these components in the past and found them to be very good.

eashton
Active Member

Posts: 8
Joined: January 24th, 2007, 7:16 pm

wow,so amazing i was about to post the same problem!
i'm using delphi 2005 and i wonder if there is a way to create an access database without the use of MS Access

i exactly have done what Kapilshah has done and have the same problem

sepehr
Active Member

Posts: 23
Joined: October 4th, 2006, 6:38 am
Location: Karaj

hey
so eashton can you help us, how to go along. When i followed the steps, it did not install the 7 components but it did create an ADOX_TBL.pas unit as stated in the procedure.
The next thing in the procedure it stated to create an empty form and add ADOXCatalog(Active X page) on the form, but since the components were not installed, i could not add them on the form. So if you could help me in context with Borland 2005, or if there some other way of creating then let me know. Thanks for you comments. Hope it will also help me and our other friend who has also posted the same problem.
Kapilshah
Active Member

Posts: 5
Joined: February 2nd, 2007, 9:30 pm

Gentlemen,

It looks like you are trying to create your own type libraries. The link in my previous post does not require you to do this. Just download the component (KAADO 1.0), ensure that you have MSDAC 2.7 installed on the computer, open the kaado.dpk file and compile/install.

It is as simple as that. No need to fiddle with type libraries.
eashton
Active Member

Posts: 8
Joined: January 24th, 2007, 7:16 pm

i followed instructions that comes with KADO as follows:
2. If it is a Delphi 2005 select "Delphi for .NET"
3. In the Project Manajer window right click on KA.Data.KADao.dll and select "Build"
4. Create subdirectory called "Source" in the KADao folder and move there all .pas files
5. Select Component/Installed Net Components menu
6. Select ".Net VCL Components" Tab
7. Click on "Add" button
8. Navigate to the KADao Folder
9. Select KA.Data.KADao.dll and click "Open" button
10.When Open Dialog closes click on "OK" button

but the component is not added tp my pallete
ps:i have MSDAC 2.7 installed

sepehr
Active Member

Posts: 23
Joined: October 4th, 2006, 6:38 am
Location: Karaj

..as I am on D6. The only other thing that I can suggest is that you contact the developer of the component. His email address is on the website.

Best of luck
Elliot
eashton
Active Member

Posts: 8
Joined: January 24th, 2007, 7:16 pm

In D6, you can create a .mdb file if you import the ADOX type
library and use code like this.

Code: Select all
uses ...,ADOX;var  ADOXCataolog:TCatalog;begin  ADOXCataolog:=TCatalog(nil);  try    ADOXCatalog.Create1('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=new.mdb');  finally    ADOXCataolog.free;  end;end;

or follow one of these tutorials:
http://codecentral.borland.com/codecent ... g?id=15292