Solved

Change extention of a database to my own application file.

Posted on 2009-07-09
3
176 Views
Last Modified: 2012-05-07
Dear experts,

I have made a programm that uses a MS-ACCESS database.
I use the components ADOConnection and ADOQuery for that.
And everythings works fine. But I have a couple of questions:

1. Do you have to install MSACCESS on the computer for my application
   to open an Acces-database?
2. I want to make of the database (.MDB) my own application file (.PKD)
    How can I do that?
3. If I change the database extention .MDB to a .PKD is than still possible
    to open it with MSACESS.

Greetings, Peter Kiers

 
0
Comment
Question by:peterkiers
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
FactorB earned 500 total points
ID: 24812565
1. No, you don't need to. You just need the compatible driver, in your case "Microsoft.Jet.OLEDB.4.0" which is pre-installed on Windows XP and above, if not you can download it from http://support.microsoft.com/?id=239114

2. Simply change the file extension from Database.mdb to Database.pkd


3. It is not possible to open the .pkd file with access straight away, file association will be lost, you will need to redo the association with the help of open dialog or programmatically ...

3.5 :) In order to access your new database you will need to use appropriate connection string, ex.
Form1.ADOConnection1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source='+IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName))+'Database.pkd;';

Regards,
B.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 24812920
Thanks for the info, you really helped me alot.
0
 
LVL 6

Expert Comment

by:FactorB
ID: 24813102
This was quick grading :)
You are always welcome.

Regards,
B.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now