NOP Design Home Page
Documentation
TOC/Index
Search
Downloads



SelectRow

Moves the row pointer in a rowset

The ODBC driver only supports the "next" method. Other drivers support "next", "previous" and "first".

Sample Source

# Connect to the database, compile a sql statement 
# bind three result columns, execute the statement
# and output the rows returned

If ( Connect dbDatabase to "DSN=dsn_name" as ODBC ) Then 
   PrepareRowset dbRowset As "SELECT 'one', 2, 3.0" From dbDatabase
   BindColumn MyOutput1 To 1 From dbRowset As String 10
   BindColumn MyOutput2 To 2 From dbRowset As Integer
   BindColumn MyOutput3 To 3 From dbRowset As Number
   iReturn := GetRowset dbRowset
   If iReturn < 0 Then
      Say GetLastError dbRowset
   EndIf
   While iReturn > 0
      Say MyOutput1 + "<br>"
      Say MyOutput2 + "<br>"
      Say MyOutput3 + "<br>"
      iReturn := SelectRow Next From dbRowset
   Loop

   Disconnect MyDatabase
Endif

Related Function(s):
   BindColumn; BindParameter; Connect; Disconnect; GetColumn; GetLastError; GetRowset;

Minimum version: 1.0