The open method procedure of the
recordset object type is used to
open a recordset. In order to call this method you need a recordset object reference, a
connection object reference to open connection object, as well as the SQL statement which will
return the recordset or recordsets, that will be referenced by the open recordset object.
The code fragment below show a typical use of a recordset. NOTE: The code
fragment is not a complete program and makes the following assumptions:
- conn is an connection object reference for an open connection object.
- conn is connected to a database with a table named customer.
- The customer table has the fields last_name and
rs.open(conn, 'select last_name, first_name from customer', rsforward);
while not rs.eof
writeln(rs.field('last_name'), ', ', rs.field('first_name'));
- This first parameter to this method is a reference to an open
- The second parameter to this method is an expression of type
string that evaluates to a SQL statement that will return
one or more recorsets.
- The third parameter to this method is an expression of type
integer that evaluates to the same value as one of the
built-in recordset type constants (you should just use
one of the recordset type constants directly). If recordset-type is not specified
then the default recordset type is assumed.
Operating Systems: All
Standard Pascal: No