Subject Strange behaviour with server name...
Author orologic_inc
Hi,

I'm using Delphi 2010 and I'm accessing a Firebird 2.5 database using dbx. I'm using the driver InterXpress for Firebird version 2.3.0.2.

Here is my problem:

I have 3 computers A, B and C

On computer A, there is a file alias.conf with the alias ALIAS_TEST that point to the database c:\temp\database-a.fdb. This alias.conf file is located in my program folder C:\MyFolder. Other FB embedded files are also located in that same folder.

On computer B, FB server is running and there is an alias.conf file with the alias ALIAS_TEST that point to the database c:\anotherfolder\database-b.fdb

On computer C, FB server is also running and there is an alias.conf file with the alias ALIAS_TEST that point to the database c:\anyfolder\database-c.fdb

On computer A, there is also some network drives mapped on computers B and C as the folllowing:

X: -> \\computerB\sharedfolderX
Y: -> \\computerC\sharedfolderY

From computer A, I'm accessing a local firebird database (database-a.fdb) using Firebird EMBEDDED. So, to do that, I do not specify any server name in my connection. Here is an example of
my connection parameters:

TSQLConnection.Params.Clear;
TSQLConnection.Params.Add('user_name=sysdba');
TSQLConnection.Params.Add('password=masterkey');
TSQLConnection.Params.Add('Database=ALIAS_TEST');
...

When I start my program from computer A, I can access my local database (ALIAS_TEST) using FB EMBEDDED without any problem. (What is important to know here is that the current directory is the folder where the program is located. For example C:\MyFolder)

Now, while my programm is runnig, if I change the current directory (for example it change to X:\some_folder because I'm using a TopenDialog object somewhere into my program), if I try to reconnect to the local database using FB EMBEDDED, the program try to connect to the ALIAS_TEST database located on the computer B (because X: is mapped on the computer B) instead of the ALIAS_TEST locally . If I change back the current directory to a local directory of the computer where the program is running from, I can connect back to my local ALIAS_TEST database without any problem. Same problem if I change the current directory to Y:, that time the program will try to access the database ALIAS_TEST located on the computer C.

So, it looks that when there is no server specified into parameters,
something somwehre try to add one.

I know it looks very strange but I have made several tests here and I'm sure about that behaviour.

So, since it cause me problems, could somebody help me about that and/or explain me about this behaviour?

Is it possible that FB embedded try to detect and add some server name when none is specified?

Thanks in advance.

Guylain Plante
OroLogic Inc.