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

  • 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 477
7 Functions — Alphabetical List
7-48
Fetch data from the database.
curs = exec(conn,'SELECT ALL January FROM salesVolume');
curs = fetch(curs);
data = curs.Data;
Close the database connection conn.
close(conn)
Connect to PostgreSQL Using a JDBC Driver
Connect to a PostgreSQL database using name-value pair arguments to specify the
vendor and connection options.
Connect to the database test_db using the user name username and password pwd
on the machine remotehost. For details, see “PostgreSQL JDBC for Windows” on page
2-76.
conn = database('test_db','username','pwd','Vendor','PostgreSQL',...
'Server','remotehost')
conn =
Instance: 'test_db'
UserName: 'username'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 org.postgresql.jdbc4.Jdbc4Connection]
TimeOut: 0
AutoCommit: 'on'
Type: 'Database Object'
conn has an empty Message property, which indicates a successful connection.
Close the database connection conn.
close(conn)
Input Arguments
instance — Data source setup or database name
string
Zobrazit stránku 477
1 2 ... 473 474 475 476 477 478 479 480 481 482 483 ... 683 684

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

Žádné komentáře