iOSSQLiteRecordSet

From Xojo Documentation

Class (inherits from Object)

An iOSSQLiteRecordSet is a group of iOSSQLiteDatabase rows and is the result of a SELECT statement.

Properties
BOF fa-lock-32.png EOF fa-lock-32.png FieldCount fa-lock-32.png
Methods
Close IdxField MoveNext
ColumnType MoveFirst MovePrevious
Field MoveLast RecordCount

Notes

You cannot use an iOSSQLiteRecordSet to modify the data it contains. Instead you'll need to use SQL statements with iOSSQLiteDatabase.SQLExecute.

Sample Code

Get the first column of data from the results of a table SELECT:

Dim sql As Text
sql = "SELECT * FROM Team;"

Dim data As iOSSQLiteRecordSet

Try
results = DB.SQLSelect(sql) ' DB is an existing, connected iOSSQLiteDatabase
Catch e As iOSSQLiteException
ErrorLabel.Text = e.Reason
Return
End Try

If results <> Nil Then
While Not results.EOF
TextArea1.Text = TextArea1.Text + Text.FromUnicodeCodepoint(10) + results.IdxField(0).TextValue

results.MoveNext
Wend
results.Close
End If

See Also

iOSSQLiteDatabase, iOSSQLiteDatabaseField, iOSSQLiteException classes