f2s_esql_column_attribute¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
f2s_esql_column_attribute {attribute} of {column#} to {variable} [using {variant}]
Parameter |
Description |
---|---|
attribute |
The attribute of the desired column. See the supported attribute list below. |
column# |
The column number. |
variable |
The returned value. |
variant |
Optional variant type variable that will receive a statement interface. |
Description
This command is used to get specific column information from the columns in a result set of an SQL statement. The optional “using” syntax allows you to pass around the interface created by this command. The variable passed MUST be a variant. This allows for multiple statements to be active concurrently in some cases. If you use the “using” syntax, it must be used on all subsequent commands. Mixing the using syntax is not supported. So for instance, if you plan on having multiple statements active concurrently, all active statements must make use of the using syntax.
Supported attributes*
Attribute Name |
Value |
---|---|
f2s_attrib_name |
1 |
f2s_attrib_type |
2 |
f2s_attrib_precision |
3 |
f2s_attrib_scale |
4 |
f2s_attrib_defined_size |
5 |
f2s_attrib_actual_size |
6 |
Example
- f2s_esql_column_attribute Command
String sColumnName sColumnType Integer i iElementCount Variant[] vRow f2s_esql_create_stmt "select * from customer" f2s_esql_prepare_stmt f2s_esql_execute_stmt f2s_esql_get_row vRow Move (SizeOfArray(vRow)) to iElementCount For i from 1 to (SizeOfArray(vRow)) f2s_esql_column_attribute f2s_attrib_name of i to sColumnName f2s_esql_column_attribute f2s_attrib_type of i to sColumnType Showln ("Column Name: " + sColumnName + " Type: " + sColumnType + " Value= " + String(vRow[i - 1])) Loop f2s_esql_close_stmt inkey WindowIndex
Replaces: Command SQL_GET_COL_ATTRIBUTE