f2s_int_output_server_state¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
set_attribute f2s_int_output_server_state of {FileNumber} to {variable}
get_attribute f2s_int_output_server_state of {FileNumber} to {variable}
Parameter |
Description |
---|---|
FileNumber |
Number of the file (filename.File_Number) |
variable |
Boolean variable. True, include SERVER_NAME in the .INT file. False do NOT include SERVER_NAME in the .INT file. Default = True |
Description
This attribute is used to specify whether the SERVER_NAME option will be included in the .INT file for the specified table. For more information about .INT files, please see Intermediate Files in the DataFlex documentation.
If set to true, the server name will be included in the .INT file (SERVER_NAME server name). If set to false, the server name will NOT be included in the .INT file.
Getting the attribute does not require a Structure_Start/Structure_End block, it can be used anywhere.
Setting the attribute can be used when creating a table or to make a modified copy of the table’s .INT file. When creating a table, this attribute must be set within the Structure_Start/Structure_End block. When making a modified copy, this can be called anywhere. However, to actually create the new .INT file, the command get the link f2s_write_int_file must be called after setting the attribute.
Examples
get_attribute
//find out whether the Server name is included in the .INT file
boolean bHasServerName
get_attribute f2s_int_output_server_state of Customer.File_Number to bHasServerName
set_attribute
//this will add the SERVER_NAME field to the Customer_copy.INT
Set_Attribute f2s_int_output_server_state of Customer.File_Number to true
f2s_write_int_file Customer.File_Number to "C:\temp\customer_copy.int"
The Customer.INT file in the data directory of the workspace will begin:
DRIVER_NAME f2s_ms
DATABASE_NAME Customer
However, the C:\temp\customer_copy.INT file will begin:
DRIVER_NAME f2s_ms
SERVER_NAME DESKTOP-WITHSERVER\SERVERWITHDB
DATABASE_NAME Customer
Related Attributes
Replaces: DF_FILE_SUPRESS_SERVERNAME_OUTPUT
NOTE - The logic on f2s_int_output_server_state is reversed from DF_FILE_SUPPRESS_SERVERNAME_OUTPUT.
DF_FILE_SUPPRESS_SERVERNAME_OUTPUT = false SAME AS f2s_int_output_server_state=true.