MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 245

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 244
Connecting to a Database Using the Native ODBC Interface
3-17
Connecting to a Database Using the Native ODBC Interface
In this section...
“About the Native ODBC Interface” on page 3-17
“Native ODBC Interface Workflow” on page 3-17
“Native ODBC, JDBC/ODBC Bridge and JDBC Interface Comparison” on page 3-19
“Compatibility and Limitations” on page 3-21
About the Native ODBC Interface
The native ODBC interface is a C++ library that allows direct communication with the
ODBC driver instead of using the Oracle JDBC/ODBC bridge. This eliminates issues
from using the bridge and eliminates heap memory outages caused by the JVM heap
memory restrictions. Using the native ODBC interface results in an improved data
import and export experience, especially when working with large amounts of data.
Native ODBC Interface Workflow
This example shows how to connect to a database using the native ODBC interface,
execute an SQL statement and fetch the returned data, insert data, and then close the
connection.
Connect to the Database Using the Native ODBC Interface
Connect to the database with the ODBC data source name, dbtoolboxdemo, using the
user name, admin, and password, admin.
conn = database.ODBCConnection('dbtoolboxdemo','admin','admin');
database.ODBCConnection returns conn as a database.ODBCConnection object.
Import Data Using the Native ODBC Interface
Select data in column productDescription from productTable using the database
connection, conn. Assign the returned cursor object to the variable curs.
curs = exec(conn,'select productDescription from productTable');
With the native ODBC interface, exec returns curs as an ODBCCursor Object instead
of a Database Cursor Object.
Vue de la page 244
1 2 ... 240 241 242 243 244 245 246 247 248 249 250 ... 683 684

Commentaires sur ces manuels

Pas de commentaire