Use the IDLdbRecordset::GetRecord function method to retrieve the value of the current record in an IDL anonymous structure. The field names of the structure are the field names of the recordset.
| Note |
Result = RSobj -> GetRecord()
Returns the value of the current record in an IDL anonymous structure.
None.
None.
The following code fragment creates a database object and connects to the database, creates a recordset object, then moves to the first record in the recordset, retrieves the value of the record, and uses the IDL HELP procedure to display information on the record.
oDB = OBJ_NEW('IDLdbDatabase')
status = DIALOG_DBCONNECT(oDB)
oRS = OBJ_NEW('IDLdbRecordset', oDB, TABLE='table')
IF(oRS->MoveCursor(/FIRST) EQ 1)THEN BEGIN
record = oRS->GetRecord()
HELP, record, /STRUCTURE
ENDIF