MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 475

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 474
database
7-45
close(conn)
Connect to Microsoft SQL Server Using Windows Authentication
Connect to a Microsoft SQL Server database with integrated Windows Authentication
using a JDBC driver.
Use the AuthType parameter to establish a Windows Authentication connection. For
details about how to set up Windows Authentication and find your port number, see
“Microsoft SQL Server JDBC for Windows” on page 2-33.
conn = database('test_db','','',...
'Vendor','Microsoft SQL Server','Server','servername',...
'AuthType','Windows','portnumber',123456)
conn =
Instance: 'test_db'
UserName: ''
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 com.microsoft.sqlserver.jdbc.SQLServerConnection]
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)
Connect to Sybase Using a JDBC Driver URL
Connect to the database dbname using the user name username and password pwd. Use
the JDBC driver com.sybase.jdbc4.jdbc.SybDriver to make the connection. Use
the URL defined by the driver vendor including your server name, port number, and
database name. For details, see “Sybase JDBC for Windows” on page 2-97.
conn = database('dbname','username','pwd',...
'com.sybase.jdbc4.jdbc.SybDriver','URL')
conn =
Vedere la pagina 474
1 2 ... 470 471 472 473 474 475 476 477 478 479 480 ... 683 684

Commenti su questo manuale

Nessun commento