Previous - dbCount Section Home - Database Next - dbRsOpenQuery


dbRsOpen ( )

Opens a recordset from a table or from a SQL statement

Usage:

dbRsOpen (object me, integer rsType, string tableNameOrSQL)

Parameter:

rsType - (integer) Possible types of ways to open a recordset

  1. create recordset from an entire table
  2. create recordset by using SQL statement

tableNameOrSQL - (string) depending on rsType input, the respective information is passed in:

  1. table name
  2. SQL statement

Returns:

(integer) - The success code

Example:

xtRose = xtra("Rosetta").new( )
xtRose.dbOpen( "Provider=MSDASQL;ExtendedAnsiSQL=2;DRIVER={Microsoft Access Driver (*.mdb)};Dbq="&the moviepath&"main" )
xtRose.dbRsOpen( 2, "Select * from Test" )

Notes:

Recordset functions are only available after opening a valid database connection. Once you are done with the recordset, be sure to call dbRsClose( ) to close the recordset


Previous - dbCount Section Home - Database Next - dbRsOpenQuery