DB.Select

Description

Opens a database connection and selects a record set using using the scope defined by the scope object and sorted according to the sort object.  This method should be called before calls are made to any navigation methods and most of the data access methods. The current position is set to the top record if the method succeeds and there are records in the resulting record set.

Syntax

Function Select

Parameters

string (input) - this is an optional parameter. Set param to "append" to request fast record insertion, append only can be done in this mode(write only record set).

Return value

boolean - true: the record set was opened successfully and there are records in the record set; false: the record set was opened successfully, but the record set is empty.

Example

Sample code

' Sample 1

Dim val

If DB.Select() Then

   Do

      val = DB.GetFieldValue( "Field1" )

   Loop While( DB.GoNext() )

End If

' Sample 2

DB.Select( "append" )

For I = 1 To 1000

   DB.AppendStart()

   DB.SetFieldValue "Field1", I

   DB.AppendFinish()

Next

See also

Platform Objects and Methods

DB.sort

DB.AppendFinish

DB.SetFieldValue

DB.TransactionFinish