RecordSetQuery

From Xojo Documentation

Revision as of 19:09, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Description

Used to obtain as selection of records that a Report can use.


Super Class

Object

Methods

Name Parameters Type Description
EOF Boolean True when the record pointer is at the end of the set of records.
Field Idx as Integer Variant Returns the value of the Field in the row the record pointer is pointing to.
Field Name as String Variant Returns the value of the Field in the row the record pointer is pointing to.
NextRecord Boolean Moves the record pointer to the next record in the RecordSetQuery.
Run Does nothing and is included for compatibility.
Type FieldName as String Integer Returns the data type of the passed column.

Please refer to the table of field types in the Database class notes for the numeric values corresponding to SQL data types.


Constructors

Name Parameters
RecordSetQuery rs as RecordSet Creates a new RecordSetQuery object from a RecordSet.


Notes

Use the RecordSetQuery constructor to obtain a group of records from a RecordSet and pass it to a Report in a suitable form. For example:

// Select the records from the database and add them to the list.
// sql is a SQL query that was returned by a call from a SQL SELECT statement
rs = app.ordersDB.sqlSelect( sql )
  
Dim rsq as New Reports.RecordSetQuery(rs)


Examples

See the Example Database example project that is included with REALbasic. It uses a REAL SQL Database as the data source. Reports.RecordSetQuery is called, as shown above, to obtain the selection from the RecordSet.


See Also

Report, ReportField, ReportLabel, ReportLineShape, ReportOvalShape, ReportRectangleShape, ReportRoundRectangleShape, ReportPicture classes, Reports module.