MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 613

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 612
ping
7-183
ping returns the database name, database version, JDBC driver name, JDBC driver
version, maximum number of database connection allowed, user name for the current
connection, and the database URL. The last field denotes if the current database
connection allows automatic commit of transactions.
Close the connection.
close(conn)
Retrieve Status of an JDBC Connection
Create a Microsoft SQL Server connection using a JDBC driver. For example, the
following code assumes you are connecting a data source named dbname with user name
username, password pwd, database server name sname, and port number 123456.
conn = database('dbname','username','pwd',...
'Vendor','Microsoft SQL Server','Server','sname',...
'AuthType','Server','portnumber',123456);
Retrieve the status of the Microsoft SQL Server connection.
ping(conn)
ans =
DatabaseProductName: 'Microsoft SQL Server'
DatabaseProductVersion: '11.00.3000'
JDBCDriverName: 'Microsoft JDBC Driver 4.0 for SQL Server'
JDBCDriverVersion: '4.0.2206.100'
MaxDatabaseConnections: 0
CurrentUserName: 'username'
DatabaseURL: 'jdbc:sqlserver:...'
AutoCommitTransactions: 'True'
ping returns the database name, database version, JDBC driver name, JDBC driver
version, maximum number of database connection allowed, user name for the current
connection, and the database URL. The last field denotes if the current database
connection allows automatic commit of transactions.
Close the connection.
Vue de la page 612
1 2 ... 608 609 610 611 612 613 614 615 616 617 618 ... 683 684

Commentaires sur ces manuels

Pas de commentaire