I have a TAdsConnection with the ConnectPath pointing to an absolute directory like c:\users\Fred\myLocalDB. The problem: Every developer has different paths.

For FireDAC, we set up a simple environment variable within the RAD Studio IDE like $(ourProjectData) where the data used for design time resides. According to the documentation regarding TAdsConnection.ConnectPath, it looks like the advantage components can only evaluate

  • Windows-based absolute paths
  • Unix-based absolute paths
  • UNC network shares

Is that correct? Does that mean every developer has to adjust the paths after checking out/cloning the project repository? Or is there away around this to use (pseudo-)relative paths?

Many thanks in advance.

asked 17 Jul '14, 01:05

Overclock%20Your%20Breakfast's gravatar image

Overclock Yo...
1157916
accept rate: 0%


You cannot point it to an environment variable, but to an alias defined in ads.ini file:

myconnection.AliasName := 'mydb';
ads.ini:
[databases]
mydb=c:\mydata\mydb.add;d

link

answered 17 Jul '14, 01:33

Joachim%20Duerr's gravatar image

Joachim Duerr
8.7k1031133
accept rate: 18%

Thank you. Your information, in combination with the documentation article "Database Aliases and the ads.ini File" have proven most helpful. Environment variables would be even cooler, though. Maybe something for v12?

(17 Jul '14, 02:04) Overclock Yo...

One other piece that might be useful is the adsini_path environment variable. You can set that to point to specifically define where ads.ini lives. It could be used to provide one more level of indirection.

link

answered 17 Jul '14, 07:56

Mark%20Wilkins's gravatar image

Mark Wilkins
7.2k226133
accept rate: 26%

That's good to know. Thank you!

(18 Jul '14, 02:15) Overclock Yo...
Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×271
×14

Asked: 17 Jul '14, 01:05

Seen: 1,346 times

Last updated: 18 Jul '14, 02:15

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.