Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Communication Between RC4 Delphi <-> PHP 3 123
Downloading email attachments 2 79
How to renew a Delphi rad-studio licence? 5 69
PHP preg_replace code convert to Delphi 14 66
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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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