当前位置: 首页 > 工具软件 > jTDS > 使用案例 >

java历程jtds,数据库连接之jtds介绍(待翻译)

锺离飞飙
2023-12-01

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.

http://www.dengb.com/Javabc/449829.htmlwww.dengb.comtruehttp://www.dengb.com/Javabc/449829.htmlTechArticleGetting Started What are the class names of the Driver, DataSource, ConnectionPoolDataSource and XADataSource implementations? Interface jTDS Implementation java.sql.Driver net.sou...

 类似资料: