creating Access Database

Please discuss general Delphi programming topics here.

creating Access Database

Postby Kapilshah » February 2nd, 2007, 9:43 pm

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
Active Member
 
Posts: 5
Joined: February 2nd, 2007, 9:30 pm

Postby Kambiz » February 2nd, 2007, 9:57 pm

This procedure is for Delphi versions prior to 2005.

I think you have to write the component wrappers by yourself.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm

Try this

Postby eashton » February 4th, 2007, 10:54 pm

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

http://www.kadao.dir.bg/
eashton
Active Member
Active Member
 
Posts: 8
Joined: January 24th, 2007, 7:16 pm

Postby sepehr » February 5th, 2007, 6:38 am

wow,so amazing i was about to post the same problem! 8)
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
User avatar
sepehr
Active Member
Active Member
 
Posts: 23
Joined: October 4th, 2006, 6:38 am
Location: Karaj

Postby Kapilshah » February 5th, 2007, 5:22 pm

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
Active Member
 
Posts: 5
Joined: February 2nd, 2007, 9:30 pm

Needs more information..

Postby eashton » February 5th, 2007, 10:45 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
Active Member
 
Posts: 8
Joined: January 24th, 2007, 7:16 pm

Postby sepehr » February 6th, 2007, 6:10 am

i followed instructions that comes with KADO as follows:
1. Open KA.Data.KADao.dpk
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
User avatar
sepehr
Active Member
Active Member
 
Posts: 23
Joined: October 4th, 2006, 6:38 am
Location: Karaj

Cannot help you from here...

Postby eashton » February 6th, 2007, 9:40 pm

..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
Active Member
 
Posts: 8
Joined: January 24th, 2007, 7:16 pm

Postby MrBaseball34 » February 16th, 2007, 4:17 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

http://delphi.about.com/library/weekly/aa072401a.htm
MrBaseball34
Active Member
Active Member
 
Posts: 7
Joined: February 15th, 2007, 9:09 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron