?
Solved

A few db questions...

Posted on 1998-07-29
12
Medium Priority
?
155 Views
Last Modified: 2010-04-04
I'm new to this, so be a little patient if I ask stupid questions.

I want to write a database application in Delphi, but there are a few things I want to be sure about.

1. Is it possible to work with components (to access the db) and use at the same time a relative path? This leads to the 2nd question:

2. If I deploy my application on another computer, what do I have to think off? I suppose I have to include my db tables (Paradox) in some directory. Does this have to be the same directory as the .exe file? Do I have to include other files (setting from the BDE, for example)?

I don't thinks this is very difficult stuff for experienced Delphi programmers as you are :-) , but please take your time to explain things carefully (if possible, give me an example).
0
Comment
Question by:Zoroaster
[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
  • 5
  • 4
  • 3
12 Comments
 
LVL 1

Expert Comment

by:AJFleming
ID: 1358970
Delphi will allow you to deal with databases either through aliases (the good way to do things) or using absolute file references. You set up an alias using the Database engine configuration tool to point at the path to your database. Then all the components refer to that alias. This means that your database could be anywhere, so long as the alias knows where it is...
0
 
LVL 1

Expert Comment

by:AJFleming
ID: 1358971
Delphi will allow you to deal with databases either through aliases (the good way to do things) or using absolute file references. You set up an alias using the Database engine configuration tool to point at the path to your database. Then all the components refer to that alias. This means that your database could be anywhere, so long as the alias knows where it is...

Good Luck,

Adam...
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1358972
Hi zoroaster,

1. What do you mean exactly? You can use alias or just use the path to the files.

2. If you use the standard db- delphi tools (and most others), then you've to distribute the BDE too. Look for redistr.txt on your delphi CD-Rom. You can use several installers for this, which can create the aliases etc automatically on the install computer. Like installshield (also on delphi cd) or http://www.connect.net/jordanr/
  The path to the datafiles doesn't have to be the same as the one of the exe-file. Because, for using the tables, you can say in which directory they are. Or you can give the alias... And when configuring the alias (bde) you can say in which directories the files are.

Zif.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1358973
OOps flemming, didn't knew you had added some comments... you've must posted them when I was preparing mine. Sorry.
0
 
LVL 1

Expert Comment

by:AJFleming
ID: 1358974
No problems, it took forever to accept the comments anyway, and I got impatient (hence the repeated section)

later,

Adam...
0
 

Author Comment

by:Zoroaster
ID: 1358975
Do I have to use an installation program to move my app from one computer to another?

About aliasses: if I write my application in c:\test\delphi\ and I deploy it to another computer where it is to be stored in c:\program files\MyApp, how can this alias point to the right directory?

In VB I always change the path to the .exe directory (in code) before any action takes place. So I'm always sure to find the right directory. I thought there might be a similar way in Delphi.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358976
> Do I have to use an installation program to move my app from one computer to another? ! Nope, it makes live easier :-)

>About aliasses: if I write my application in c:\test\delphi\ and I deploy it to another computer where it is to be stored in c:\program files\MyApp, how can this alias point to the right directory? ! Simple, your alias points on your computer to c:\test\delphi. On the other computer you can point the alias to another directory. (When you use aliases, you don't have to change your delphi program...) When using aliases, you've to install the alias on the remote computer too... see BDE administator (or BDE configuration) depending on version of BDE.

> In VB I always change the path to the .exe directory (in code) before any action takes place. So I'm always sure to find the right directory. I thought there might be a similar way in Delphi. ! that's in delphi possible too...

Zif.

0
 

Author Comment

by:Zoroaster
ID: 1358977
> In VB I always change the path to the .exe directory (in code) before any action takes place. So I'm always sure to find the right directory. I thought there might be a similar way in Delphi. ! that's in delphi possible too...

Can you tell me how?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358978
Hi,

 with GetDir you get the current directory. Place this one into your tables. Still, alias names are much better!

var

   s : string;
 begin
   GetDir(0,s); { 0 = Current drive }
   MessageDlg('Current drive and directory: ' + s, mtInformation, [mbOk] , 0);
 end;


0
 

Author Comment

by:Zoroaster
ID: 1358979
Thanks for helping me out a little bit.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358980
when problems, just ask.
0
 

Author Comment

by:Zoroaster
ID: 1358981
OK, thanks, I will do that :-)
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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 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