Solved

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

Posted on 2002-04-29
5
195 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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