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

  • 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 502
read
7-73
read
Read data in DatabaseDatastore
Syntax
data = read(dbds)
data = read(dbds,rowcount)
[data,info] = read( ___ )
Description
data = read(dbds) retrieves data from the DatabaseDatastore object in increments
specified using setdbprefs and in the format specified using setdbprefs.
data = read(dbds,rowcount) retrieves data from the DatabaseDatastore object in
increments specified by rowcount and in the format specified using setdbprefs.
[data,info] = read( ___ ) retrieves data from the DatabaseDatastore object
using the input arguments in the previous syntaxes.
Examples
Retrieve Data
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','','');
Vue de la page 502
1 2 ... 498 499 500 501 502 503 504 505 506 507 508 ... 683 684

Commentaires sur ces manuels

Pas de commentaire