MATLAB DATABASE TOOLBOX RELEASE NOTES User's Guide Page 439

  • Download
  • Add to my manuals
  • Print
  • Page
    / 684
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 438
close
7-9
close
Close database connection, DatabaseDatastore, cursor, or resultset object
Syntax
close(object)
Description
close(object) closes the database and driver resource utilizer object to free up
database and driver resources.
Examples
Close the Database Connection 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');
Close the database connection conn.
close(conn)
Close the DatabaseDatastore 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');
Create a DatabaseDatastore object dbds using the database connection conn and
SQL query sqlquery. This SQL query retrieves all products from the product table
productTable ordered by product number.
sqlquery = 'select * from productTable order by productNumber';
Page view 438
1 2 ... 434 435 436 437 438 439 440 441 442 443 444 ... 683 684

Comments to this Manuals

No comments