MATLAB DATABASE TOOLBOX RELEASE NOTES Podręcznik Użytkownika Strona 478

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 684
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 477
1 2 ... 473 474 475 476 477 478 479 480 481 482 483 ... 683 684

Komentarze do niniejszej Instrukcji

Brak uwag