?
Solved

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

Posted on 2002-04-29
5
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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