reads the current row from a result set.
Details and Options
Examples
Basic Examples
Options
"GetAsStrings"
Possible Issues
See Also
Tech Notes
Related Guides
DatabaseLink`
DatabaseLink`
SQLResultSetCurrent
reads the current row from a result set.
Details and Options
- To use SQLResultSetCurrent, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- The following option can be given:
-
"GetAsStrings" False return the results as strings
Examples
open all close allBasic Examples (1)
Needs["DatabaseLink`"]If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the DatabaseLink`DatabaseExamples` package, as described in Using the Example Databases.
conn = OpenSQLConnection["publisher"];rs = SQLResultSetOpen[SQLSelect[conn, "roysched"]]Shift the current position to the first row:
SQLResultSetShift[rs, 1];SQLResultSetPosition[rs]SQLResultSetCurrent[rs]SQLResultSetClose[rs]CloseSQLConnection[conn];Options (1)
"GetAsStrings" (1)
Needs["DatabaseLink`"]conn = OpenSQLConnection["publisher"];rs = SQLResultSetOpen[SQLSelect[conn, "roysched"]];SQLResultSetShift[rs, 1];SQLResultSetCurrent[rs, "GetAsStrings" -> True]//InputFormSQLResultSetClose[rs]CloseSQLConnection[conn];Possible Issues (1)
Needs["DatabaseLink`"]conn = OpenSQLConnection["publisher"];rs = SQLResultSetOpen[SQLSelect[conn, "roysched"]];There is nothing to read before the first row:
SQLResultSetPosition[rs]SQLResultSetCurrent[rs]There is nothing to read after the last row:
SQLResultSetGoto[rs, Infinity];SQLResultSetPosition[rs]SQLResultSetCurrent[rs]SQLResultSetClose[rs]CloseSQLConnection[conn];