MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 513

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 512
reset
7-83
reset
Reset cursor position in DatabaseDatastore
Syntax
reset(dbds)
Description
reset(dbds) repositions the cursor object in the DatabaseDatastore object dbds to
the start of the data set by executing the SQL query again.
Examples
Reset the Cursor Position
The default output data type of any datastore is a table. Set the database preference
for the data return format 'DataReturnFormat' to table for consistency across data
types.
setdbprefs('DataReturnFormat','table')
Create a database connection conn using the native ODBC interface with Windows
Authentication. This code assumes you are connecting to a Microsoft SQL Server
database with the data source named MS SQL Server Auth. MS SQL Server Auth
contains the table named productTable with 15 product records.
conn = database.ODBCConnection('MS SQL Server Auth','','');
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 [toy_store].[dbo].[productTable] '...
'order by productNumber'];
Vedere la pagina 512
1 2 ... 508 509 510 511 512 513 514 515 516 517 518 ... 683 684

Commenti su questo manuale

Nessun commento