DatabaseLink`
DatabaseLink`

SQLResultSetRead

SQLResultSetRead[rs]

shifts the current position and then reads a row from a result set.

SQLResultSetRead[rs,num]

reads num rows from a result set.

Details and Options

  • To use SQLResultSetRead, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following option can be given:
  • "GetAsStrings" Falsereturn the results as strings

Examples

open allclose all

Basic Examples  (1)

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.

Open a connection:

Open a result set:

Read the first row:

Read the second and third rows:

Read the last four rows:

Close the result set:

Options  (1)

"GetAsStrings"  (1)

Applications  (1)

Process each row individually, and get the sum: