Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change extention of a database to my own application file.

Posted on 2009-07-09
3
Medium Priority
?
185 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

885 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