This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

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.
  • To use SQLResultSetRead, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following option can be given:
"GetAsStrings"Falsereturn the results as strings
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 DatabaseExamples` package, as described in Using the Example Databases.
In[2]:=
Click for copyable input
Open a result set:
In[3]:=
Click for copyable input
Read the first row:
In[4]:=
Click for copyable input
Out[4]=
Read the second and third rows:
In[5]:=
Click for copyable input
Out[5]=
Read the last four rows:
In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]=
Close the result set:
In[8]:=
Click for copyable input
In[9]:=
Click for copyable input