Skip to content
Gabriel Pedro edited this page Jul 21, 2016 · 1 revision

Frequently Asked Questions (work in progress)

Getting Started

  • What are the class names of the Driver, DataSource, ConnectionPoolDataSource, XADataSource and ObjectFactory implementations?
  • What is the URL format used by jTDS?
  • jTDS is supposed to be the fastest JDBC driver around. Have you got any figures to prove that? Or even better, a benchmark I can run myself?
  • Which JDBC features are and which features are not supported by jTDS?
  • Can jTDS be used in a multi threaded application?

Error Conditions

  • Why do I get a ClassNotFoundError when calling Class.forName("net.sourceforge.jtds.jdbc.Driver")?
  • Why do I get a java.sql.SQLException: "No suitable driver" when trying to get a connection?
  • Why do I get java.sql.SQLException: "Network error IOException: Connection refused: connect" when trying to get a connection?
  • Where does one place an instance name in the connect string? Connecting with "jdbc:jtds:sqlserver://host\instance:port/database" gives an SQLException with the message "Logon failed".
  • Why do I get a java.sql.SQLException: "Unable to get information from SQL Server" when trying to connect to an SQL Server instance?
  • I was hoping that appending ";domain=X" to the URL would be enough on a workstation that was already logged into domain X. * Why do I still need to provide a username and password? executeQuery() throws java.sql.SQLException: "The executeQuery method must return a result set.".
  • I get java.sql.SQLException: "ResultSet may only be accessed in a forward direction" or "ResultSet is read only" when using a scrollable and/or updateable ResultSet.
  • Not all SQLExceptions thrown by jTDS seem to have associated meaningful SQL state values.
  • Batch processing with executeBatch() hangs or is unreliable on Sybase.

Incorrect Behavior

  • CallableStatement output parameter getter throws java.sql.SQLException: "Parameter X has not been set.".
  • PreparedStatement.executeUpdate() returns an incorrect update count.
  • Why do I get java.sql.SQLException: "Output parameter not allowed as argument list prevents use of RPC." when calling a stored procedure?

Memory Usage

  • Memory usage keeps increasing when using generated PreparedStatements.

TDS Protocol Version

  • I'm trying to connect to SQL Server 6.5, but it hangs when calling getConnection().
  • Why do column names more than 30 characters long, get chopped off at 30 characters?
  • jTDS fetches only the first 4Kb of IMAGE data.
  • What do i have to do to connect to Netcool Omnibus (or any derived Product).

Technical Support

  • Is there any commercial technical support available for jTDS?

Other

  • I didn't find the answer to my problem in this FAQ. What should I do?

What are the class names of the Driver, DataSource, ConnectionPoolDataSource, XADataSource and ObjectFactory 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
javax.naming.spi.ObjectFactory net.sourceforge.jtds.jdbcx.JtdsObjectFactory

[top]