MATLAB DATABASE TOOLBOX RELEASE NOTES Uživatelská příručka Strana 503

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 684
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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','','');
Zobrazit stránku 502
1 2 ... 498 499 500 501 502 503 504 505 506 507 508 ... 683 684

Komentáře k této Příručce

Žádné komentáře