f2s_esql_get_stmt¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax¶
f2s_esql_get_stmt {variable} [using {variant}]
Parameter |
Description |
---|---|
variable |
The string variable that will receive the set SQL Statement attached to the interface. |
variant |
The optional variant type variable that will receive a statement interface. |
Description¶
This command returns the last embedded SQL statement that was executed into a string. Optional parameters can be passed to specify what character to start the string at and also the maximum number of characters to allow for the string.
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.
Example¶
Variant vStat Variant[] vRow String sVal f2s_esql_create_stmt "Select * from sys.databases" using vStat f2s_esql_set_cursor_type f2s_olecursor_server using vStat f2s_esql_prepare_stmt using vStat f2s_esql_execute_stmt using vStat f2s_esql_move_next using vStat If (Found) Begin f2s_esql_get_row vRow using vStat // Do Something End f2s_esql_get_stmt sVal using vStat Showln "Get Statement Value: " sVal f2s_esql_close_stmt using vStat inkey windowIndex