f2s_table_server_name¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
set_attribute f2s_table_server_name of {FileNumber} to {variable}
get_attribute f2s_table_server_name of {FileNumber} to {variable}
Parameter |
Description |
---|---|
FileNumber |
Number of the file (filename.File_Number) |
variable |
String variable. Name of the database server |
Description
This attribute is used to set or get the name of the database server cooresponding to the specified file number. This will throw an error if the file is not open. Setting the attribute is used when creating a new table or to permanently change the server that an existing filelist entry is pointing. This attribute must be set within a structure_start/structure_end block (see DataFlex documentation for more information).
This attribute is associated with the SERVER_NAME token in the .INT file.
Examples
get_attribute
Open Orderhdr
string sDatabase
Get_Attribute f2s_table_server_name of OrderHea.File_Number to sDatabase
set_attribute
handle hCustomer
move Customer.File_Number to hCustomer
structure_start hCustomer f2s_msx64
Set_Attribute f2s_table_server_name of hHold to "TheNewServer\TheNewInstance"
structure_end hCustomer
Before running the above code, the customer.INT file will start with:
DRIVER_NAME f2s_msx64
DATABASE_NAME Customer
After running the above code, the customer.INT file will change to
DRIVER_NAME f2s_msx64
SERVER_NAME TheNewServer\TheNewInstance
DATABASE_NAME Customer
Related Attributes
f2s_db_name f2s_int_output_server_state
Replaces: DF_FILE_SERVER_NAME