f2s_esql_get_row

Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers

Syntax

f2s_esql_get_row {variant[]} [using {variant}]

Parameter

Description

variant array

variant array to hold the row data

variant

Optional variant type variable that will receive a statement interface

Description

This command is used to fetch the current row returned by the associated SQL statement into a variant array.

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.

Error Codes

Error Code

Error Message

25006

There is no active result set to advanced on for this statement.

Examples

A simple example without using the “using” syntax
Variant[] vRow
f2s_esql_create_stmt "select * from orderheader where SalesPerson_ID = ?"
f2s_esql_prepare_stmt
f2s_esql_set_param 1 to "NONE"
f2s_esql_execute_stmt
f2s_esql_move_next
While (Found)
    f2s_esql_get_row vRow
    Showln (SFormat("First Column: %1 Second Column:  %2",vRow[0], vRow[1]))
    f2s_esql_move_next
Loop
f2s_esql_close_stmt