一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

数据库连接之jtds介绍(待翻译)

时间:2022-07-02 18:18:40 编辑:袖梨 来源:一聚教程网


Getting Started
What are the class names of the Driver, DataSource, ConnectionPoolDataSource and XADataSource implementations?
Interface
jTDS Implementation
java.sql.Driver
net.sourceforge.jtds.jdbc.Driver
javax.sql.DataSource
net.sourceforge.jtds.jdbcx.JtdsDataSource
javax.sql.ConnectionPoolDataSource
net.sourceforge.jtds.jdbcx.JtdsDataSource
javax.sql.XADataSource
net.sourceforge.jtds.jdbcx.JtdsDataSource
^ top ^
What is the URL format used by jTDS?
The URL format for jTDS is: jdbc:jtds:://[:][/][;=[;...]]
where is one of either 'sqlserver' or 'sybase' (their meaning is quite obvious), is the port the database server is listening to (default is 1433 for SQL Server and 7100 for Sybase) and is the database name -- JDBC term: catalog -- (if not specified, the user's default database is used). The set of properties supported by jTDS is:
user (required)
User name to use for login. When using getConnection(String url, String user, String password) it's not required to set this property as it is passed as parameter, but you will have to set it when using getConnection(String url, Properties info) or TdsDataSource.
password (required)
Password to use for login. When using getConnection(String url, String user, String password) it's not required to set this property as it is passed as parameter, but you will have to set it when using getConnection(String url, Properties info) or TdsDataSource.
TDS (default - "8.0" for SQL Server; "5.0" for Sybase)
The version of TDS to be used. TDS (Tabular Data Stream) is the protocol used by Microsoft SQL Server and Sybase to communicate with database clients. jTDS can use TDS 4.2, 5.0, 7.0 and 8.0. Version 4.2 is used by SQL Server 6.5 and Sybase 10. Version 5.0 is used with Sybase 11 onwards. Version 7.0 is used by SQL Server 7.0; this protocol also works with SQL Server 2000. Version 8.0 is used by SQL Server 2000 and SQL Server 2005.

热门栏目