f2s_default_tablespace¶
Applies to: Oracle, PostgreSQL Drivers
Syntax
set_attribute f2s_default_tablespace of {DriverId} to {variable}
get_attribute f2s_default_tablespace of {DriverId} to {variable}
Parameter |
Description |
---|---|
DriverID |
The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID. |
variable |
String varible for the tablespace name. |
Description
A tablespace is a container of segments, objects that have an allotted amount of space, i.e. tables and indexes. This attribute is used to get or set the name of the default tablespace to be used by DataFlex when creating tables. To set the default tablespace name for indexes, use the f2s_default_index_tablespace attribute. Set this attribute ONLY to an existing tablespace.
Getting or setting the attribute can be done at any time.
Even though MYSQL uses tablespaces, this this attribute is only supported in Oracle and PostgreSQL.
Examples
get_attribute
string st1
get_attribute f2s_default_tablespace of _f2s_ActiveDriverID to st1
set_attribute
In this example, a new table, TestFile is created in the same tablespace as the Customer File.
String st1
Handle hNewTable
Integer iColumn
Move 0 to hNewTable
Get_Attribute f2s_table_tablespace of Customer.File_Number to st1
Showln (SFormat("adding to tablespace %1", st1))
Set_Attribute f2s_default_tablespace of _f2s_ActiveDriverID to st1
Structure_Start hNewTable _f2s_ActiveDriver
Set_Attribute DF_FILE_PHYSICAL_NAME of hNewTable to "TestFile"
Move 0 to iColumn
Create_Field hNewTable At iColumn
Set_Attribute DF_FIELD_NAME of hNewTable iColumn to "TestFile_Number"
Set_Attribute DF_FIELD_TYPE of hNewTable iColumn to DF_BCD
Set_Attribute DF_FIELD_LENGTH of hNewTable iColumn to 6
Move 0 to iColumn
Create_Field hNewTable At iColumn
Set_Attribute DF_FIELD_NAME of hNewTable iColumn to "TestDate"
Set_Attribute DF_FIELD_TYPE of hNewTable iColumn to DF_DATE
Move 0 to iColumn
Create_Field hNewTable At iColumn
Set_Attribute DF_FIELD_NAME of hNewTable iColumn to "Comment"
Set_Attribute DF_FIELD_TYPE of hNewTable iColumn to DF_TEXT
Set_Attribute DF_FIELD_LENGTH of hNewTable iColumn to (8 * 1024)
Structure_End hNewTable
Related Attributes
Replaces: Commands SET_DEFAULT_TABLESPACE and GET_DEFAULT_TABLESPACE