MATLAB DATABASE TOOLBOX RELEASE NOTES Guia do Utilizador Página 466

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 684
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 465
7 Functions — Alphabetical List
7-36
Statement: [1x1 database.internal.ODBCStatementHandle]
With the native ODBC interface, curs returns an ODBCCursor Object instead of a
Database Cursor Object.
View the contents of the Data element in the cursor object.
curs.Data
ans =
'Victorian Doll'
'Train Set'
'Engine Kit'
'Painting Set'
'Space Cruiser'
'Building Blocks'
'Tin Soldier'
'Sail Boat'
'Slinky'
'Teddy Bear'
Close the cursor object.
close(curs)
Import All Rows of Data
Working with the dbtoolboxdemo data source, use exec to select data in column City,
for example, in table suppliers. Then, use fetch to import all data from the SQL
statement into the cursor object curs, and store the data in a cell array contained in the
cursor object field curs.Data.
curs = exec(conn,'select City from suppliers');
curs = fetch(curs)
curs =
Attributes: []
Data: {10x1 cell}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: 'select City from suppliers'
Message: []
Type: 'Database Cursor Object'
ResultSet: [1x1 sun.jdbc.odbc.JdbcOdbcResultSet]
Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]
Statement: [1x1 sun.jdbc.odbc.JdbcOdbcStatement]
Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]
Vista de página 465
1 2 ... 461 462 463 464 465 466 467 468 469 470 471 ... 683 684

Comentários a estes Manuais

Sem comentários