ADO RecordSet Process: Difference between revisions

From AutoIt Wiki
Jump to navigation Jump to search
mNo edit summary
Line 28: Line 28:


; MoveNext
; MoveNext
: Moves the position of the current record pointer forward to the next record
: Moves the position of the current record pointer forward to the next record.<br />
If you are at the last record, calling this method will put you at EOF and the EOF property will be set to True. If you are at EOF and call this method, an error will be generated


; MovePrevious
; MovePrevious

Revision as of 22:00, 12 January 2014

Search/process the fetched data

Access

GetRows
Used to copy either all or a specified number of records into a two-dimensional array
GetString
Returns the specified Recordset as a string
Save
Saves the Recordset to a file or Stream object
Delete
Deletes the current record, a group of records, or all records

Search

Find
Searches for a row in a Recordset that matches the given criteria.
Seek
Uses the index of a Recordset to locate a specified row

Move

MoveFirst
Moves the position of the current record pointer to the first record
MoveLast
Moves the position of the current record pointer to the last record
MoveNext
Moves the position of the current record pointer forward to the next record.

If you are at the last record, calling this method will put you at EOF and the EOF property will be set to True. If you are at EOF and call this method, an error will be generated

MovePrevious
Moves the position of the current record pointer back to the previous record

Sort

The Sort property sets or returns a string value that provides the names of the fields in the Recordset that you wish sorted. Each name must be separated by a delimiter comma and the entire string must be enclosed within a pair of double quotes. If the field name contains blank spaces, you need to enclose it within a pair of square brackets.

You also have the option of specifying that the sort be in ascending or descending order for each individual field. You can declare the sort order by placing a blank space followed by either the keyword ASC, for an ascending sort, or DESC, for a descending sort, directly after the field name, but before the delimiter comma. The default is to sort in ascending order.

The CursorLocation property will need to be set to adUseClient.