contents   index   previous   next

Database table()




tableName - The name of an existing table in the database.


mode - optional parameter indicating whether the cursor can be modified.



object - Cursor object representing the specified database table.



This method creates a new Cursor object from the specified table stored in the database. The resulting Cursor has one row for each row in the database table and will be empty if the database table has no rows.


The optional mode parameter specifies how the Cursor object will access and modify records. The options for this field are:


Database.snapshot - uses SQLExtendedFetch, static cursor


Database.dynaset - uses SQLExtendedFetch, keyset driven cursor


Database.forwardOnly - uses SQLFetch


Database.dynamic - uses SQLExtendedFetch, dynamic cursor


If no value is specified in the mode parameter, the cursor is created Database.snapshot.


If an updateable Cursor object is desired, the virtual table returned by the sqlstatement parameter must be updateable. For example, the SELECT statement passed as the sqlstatement parameter cannot contain a GROUP BY clause. In addition, the query usually must retrieve key values from a table. For more information on constructing updateable queries, consult your database vendor's documentation.



#link <sedbc>, Cursor object, Database tables(), Database tableName()



// create a new Cursor object

// from the "clients" database table

clientsCurs = db.table( "clients", false );


Database tableName()