Hi,
I'm using unidac to connect to an advantage database server.
When I specify a full path to the database (like "C:\DB\database.ADD") it works fine, but when I use the alias (which is defined in the ads.ini) I can connect to the database, but I can't open any table (table not found).
How can I connect to the database using the alias?
Thanks!
Connect to ADS database using an alias
Hello again,
sorry for my late respone, I've been in hollidays the last weeks.
Here's a piece of my ads.ini:
Thanks for your help.
sorry for my late respone, I've been in hollidays the last weeks.
Here's a piece of my ads.ini:
Code: Select all
[Databases]
MYDB1=\pc173\db\db1\db1.add;D
MYDB2=\pc173\db\db2\db2.add;D
[Settings]
ADS_SERVER_TYPE=7
Hi, thanks for confirming this.
It would be nice if this feature is integrated in a future release.
For now, I simply solve it this way:
It would be nice if this feature is integrated in a future release.
For now, I simply solve it this way:
Code: Select all
procedure TdmMain.UniConnection1BeforeConnect(Sender: TObject);
var
ini : TIniFile;
dbPath : String;
begin
ini := TIniFile.Create('c:\path-to\ads.ini');
dbPath := ini.ReadString('Databases','DB1','');
UniConnection1.Database := LeftStr(dbPath, Pos(';',dbPath)-1);
end;