f2s_server¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
set_attribute f2s_server of {DriverID} to {server}
get_attribute f2s_server of {DriverID} to {server}
Parameter |
Description |
---|---|
DriverID |
The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID. |
server |
String, name of the server |
Description
Setting this attribute sets the server to be used when opening tables. By default, the server used during login will be returned. This command is only needed when connecting to multiple SQL servers (or multiple SQL server instances, in the case of MSSQL).
NOTE: Setting this attribute will NOT override the SERVER_NAME token in the INT file.
Examples
get_attribute
string sCurrentServer
get_attribute f2s_server of _f2s_ActiveDriverID to sCurrentServer
set_attribute
string sOtherServer="SomeOtherServer"
//Login to the new server
Login sOtherServer "" "" _f2s_ActiveDriver
//set the driver to access the new server
set_attribute f2s_server of _f2s_ActvieDriverID to sOtherServer
ESQL Equivalents
Replaces: Commands SET_CURRENT_SQL_SERVER and GET_CURRENT_SQL_SERVER