Subject Re: [firebird-support] ConnectionString setting datasource
Author Helen Borrie
At 04:52 AM 19/01/2008, you wrote:
>On a LAN from a client, is there anyway we can set the path of the
>server which is running on another machine.
>
>Our Connection String is as follows
>
>User=SYSDBA;
>Password=masterkey;
>Datasource=blackdell;
>port=3050;
>Database=C:\Store.fdb;
>Dialect=3;
>Charset=NONE;
>Role=;
>Pooling=true;
>MinPoolSize=0;
>MaxPoolSize=50;
>PacketSize=8192;
>ServerType=0;

That's not the connection string, it is a set of properties that your data access interface (ODBC?) will use to construct the connection string. Here is the connection string:

blackdell/3050:C:\Store.fdb

>On customer installation this connection string is not modifiable.
>Programatically I can set the datasource, but I am scared to do that
>as it slows down the db access.

What evidence do you have of that? The DA layer has to construct the connection string in any event. It should not make any difference whether it reads the property from hard code or from a registry entry.

>Hence is there anyway I can set the datasource in a client machine
>without setting it in connection string.

Firebird itself has no knowledge of what your applications are using to interface with it, other than at the level of the API, i.e., the Firebird client DLL. The Firebird API has a structure called the DPB, that each different driver wraps in its own way, to make it understandable by the application code.

ODBC has its own way to wrap the data members for the DPB. An ODBC driver has its own way and, as there are multiple ODBC drivers for Firebird, one ODBC driver might do it differently to another. The .NET Provider has its own (different) way. The Jaybird (Java JDBC) driver has its own (different) way....and so on. Each driver/DAL has its own specific way - often driven by external standards - for wrapping the DPB. Ask on the appropriate list for the driver you are using: drivers usually provide mechanisms to do this sort of thing without hard-coding.

You can find and subscribe to the driver-specific lists at http://firebirdsql.org/index.php?op=lists

./heLen