Tnx
:-)
Fede.
How to create an Alias at runtime? (Delphi/Lazarus)
Moderators: gto, cipto_kh, EgonHugeist
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: How to create an Alias at runtime? (Delphi/Lazarus)
Hello Fede,
what do you try to acomplish? What kind of alias do you want to create at runtime? Which database system do you use?
Best regards,
Jan
what do you try to acomplish? What kind of alias do you want to create at runtime? Which database system do you use?
Best regards,
Jan
Re: How to create an Alias at runtime? (Delphi/Lazarus)
ok.
I have a Firebird DB rel.2.5.2.
I'm developing a software that it will connects to DB using an alias in Firebird.
The alias's name will be decide by user, so I will be must create it at runtime everytime the user will create a new.
I have a Firebird DB rel.2.5.2.
I'm developing a software that it will connects to DB using an alias in Firebird.
The alias's name will be decide by user, so I will be must create it at runtime everytime the user will create a new.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: How to create an Alias at runtime? (Delphi/Lazarus)
Hello ciambotto,
to create a firebird alias, you would have to modify the file aliases.conf in the firebird server directory. But to be able to modify that file, your program usually would have to run with administrator privileges. Are you sure, that is what you want?
If you only want to store connection informaton (server name, database, username, apssword, ...) you could simply store an ini file in the users profile that holds this information for you?
Best regards,
Jan
to create a firebird alias, you would have to modify the file aliases.conf in the firebird server directory. But to be able to modify that file, your program usually would have to run with administrator privileges. Are you sure, that is what you want?
If you only want to store connection informaton (server name, database, username, apssword, ...) you could simply store an ini file in the users profile that holds this information for you?
Best regards,
Jan
Re: How to create an Alias at runtime? (Delphi/Lazarus)
marsupilami wrote:Hello ciambotto,
to create a firebird alias, you would have to modify the file aliases.conf in the firebird server directory. But to be able to modify that file, your program usually would have to run with administrator privileges. Are you sure, that is what you want?
Jan
This means that even if I had Administrator privileges, there is no method "CreateFirebirdDBAlias"?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: How to create an Alias at runtime? (Delphi/Lazarus)
Hello ciambotto,
no, there is no method like CreateFirebirdDBAlias. The aliases.conf file is a simple text file, formed of lines like:
databasealias = /path/to/database.fdb
for Unix / Linux or
databasealias = C:\path\to\database.fdb
for Windows. It should be simple to add lines as you need them. Maybe even by utilizing TIniFile.
Best regards,
Jan
no, there is no method like CreateFirebirdDBAlias. The aliases.conf file is a simple text file, formed of lines like:
databasealias = /path/to/database.fdb
for Unix / Linux or
databasealias = C:\path\to\database.fdb
for Windows. It should be simple to add lines as you need them. Maybe even by utilizing TIniFile.
Best regards,
Jan
Re: How to create an Alias at runtime? (Delphi/Lazarus)
Ok. :-(
so where do I post a request to implement a method like "CreateFirebirdDBAlias"?
so where do I post a request to implement a method like "CreateFirebirdDBAlias"?