User`s guide

7 Functions — Alphabetical List
7-10
dbds = datastore(conn,sqlquery);
Close the DatabaseDatastore object dbds.
close(dbds)
Close the Cursor Object
Using the native ODBC interface, connect to the database with the ODBC data source
name dbtoolboxdemo with the user name admin and password admin.
conn = database.ODBCConnection('dbtoolboxdemo','admin','admin');
Select data from productTable that you access using the database.ODBCConnection
object conn. Assign the returned cursor object to the variable curs.
sqlquery = 'select * from productTable';
curs = exec(conn,sqlquery);
Close the cursor object curs before closing the database connection.
close(curs)
Close the database connection conn.
close(conn)
Close the Resultset Object
Connect to the database with the ODBC data source name dbtoolboxdemo with the
user name admin and password admin.
conn = database('dbtoolboxdemo','admin','admin');
Select data from productTable that you access using the database connection object
conn. Assign the returned cursor object to the variable curs.
sqlquery = 'select * from productTable';
curs = exec(conn,sqlquery);
Construct a resultset object rset.
rset = resultset(curs);
Close the resultset object rset.