Solved

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

Posted on 2002-04-29
5
189 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
Comment Utility
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
Comment Utility
any results?
0
 

Author Comment

by:annas
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you for your response

Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

16 Experts available now in Live!

Get 1:1 Help Now