MATLAB DATABASE TOOLBOX RELEASE NOTES Podręcznik Użytkownika Strona 543

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 684
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 542
exec
7-113
exec
Execute SQL statement and open cursor
Syntax
curs = exec(conn,sqlquery)
curs = exec(conn,sqlquery,qTimeOut)
curs = exec(conn,sqlquery,Name,Value)
Description
curs = exec(conn,sqlquery) executes the SQL statement sqlquery for the database
connection conn and returns the cursor object curs.
curs = exec(conn,sqlquery,qTimeOut) executes the SQL statement with a
timeout value qTimeOut.
curs = exec(conn,sqlquery,Name,Value) executes the SQL statement and creates
a scrollable cursor.
Examples
Select Data from a Database Table Using the Native ODBC Interface
Create a connection conn using the native ODBC interface and the dbtoolboxdemo
data source.
conn = database.ODBCConnection('dbtoolboxdemo','admin','admin');
Select data from productTable that you access using the database.ODBCConnection
object, conn. Assign the SQL statement to the variable sqlquery. Assign the returned
cursor object to the variable curs.
sqlquery = 'select * from productTable';
curs = exec(conn,sqlquery)
curs =
ODBCCursor with properties:
Przeglądanie stron 542
1 2 ... 538 539 540 541 542 543 544 545 546 547 548 ... 683 684

Komentarze do niniejszej Instrukcji

Brak uwag