User`s guide
7 Functions — Alphabetical List
7-46
Instance: 'dbname'
UserName: 'username'
Driver: 'com.sybase.jdbc4.jdbc.SybDriver'
URL: 'URL'
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 com.sybase.jdbc4.jdbc.SybConnection]
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 Oracle Using a JDBC Driver
Connect to an Oracle 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. Enter the driver type as thin for a default connection to Oracle. To connect to
Oracle with Windows authentication use oci. The database server machine name is
remotehost and the port number that the server is listening on is 1234. For details, see
“Oracle JDBC for Windows” on page 2-48.
conn = database('test_db','username','pwd','Vendor','Oracle',...
'DriverType','thin','Server','remotehost','PortNumber',1234)
conn =
Instance: 'test_db'
UserName: 'username'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 oracle.jdbc.driver.T4CConnection]
TimeOut: 0
AutoCommit: 'on'
Type: 'Database Object'
conn has an empty Message property, which indicates a successful connection.