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

  • 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 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'];
Vue de la page 512
1 2 ... 508 509 510 511 512 513 514 515 516 517 518 ... 683 684

Commentaires sur ces manuels

Pas de commentaire