Solved

Third-Party VCL won't allow an application to be run from CD

Posted on 2002-04-29
5
194 Views
Last Modified: 2010-04-04
I have a third-party dabase VCL that is a simple replacement for the BDE, from Unley Software. But I can't get it to run from a CD or floppy. If I develope the program from a folder on the harddrive, thats where the program expects to find the database. If I later transfer the program to my rewritable CD drive(drive E:), It won't run from there. I know where the problem lies. I connect my program to the database via the object inspector, using a property editor. I suppose i could connect the database at runtime using <minitable.table := 'd:\table.mtd'> but what if my user's drive uses a different drive letter? I can't always know which drive they use. Also what if they want to transfer the program to different media later on?
Can anyone help me solve this?
Thanx...
Paul
 
0
Comment
Question by:annas
  • 2
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6976851
if your databasefile resides with your application in the same location/directory, then you could easy use at appstart (preferable on the formcreate-evenet of your mainform) something like this

minitable.table := extractfilepath(application.exename)+'table.mtd';  //maybe +'\table.mtd';

and after this open your table

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6979717
any results?
0
 

Author Comment

by:annas
ID: 6980617
Well actually I havn't tried it yet, recovering from the stress of a car accident in which I totaled my car! I also got a response from unley software. They sent me a long involved solution. It's kind of dissapointing, really. I had hoped for a short, simple solution. What I have ended up doing was just to connect the minitable and the controls at runtime and give the path as it would be on the CD ie the D: drive. Most people's CD drive will be the D: drive, but that's not gaurentteed. I wonder if i could put the minitable in a resource file? Would that work?
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9004301
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from kretzschmar

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9004898
Thank you for your response

Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mobile Keyboard covers the display of the TMemo 3 102
Performance of SQL statement 37 137
how to update exe applicatio from internet ? 6 94
DBGrid or StringGrid ? 6 120
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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