jTDS

Today, I was looking for a Sybase JDBC driver, and found this software project:

The jTDS Project

It is a open source JDBC driver for both SQL Server and Sybase.  I haven’t had much opportunity to use it, but it looks great.  They claim to be very fast.

I have started incorporating it into my query tool: Project Shaphan.

Here are some links and information to help you get started:

Here is the code that I am working with to create a link:

		try {
			Class.forName("net.sourceforge.jtds.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			(new ProjectJobException(e)).displayException();
		}
		String serverType = optionsGUI.getServerType();
		String serverName = optionsGUI.getServerName();
		String portNumber = optionsGUI.getPort().trim();
		if(portNumber.length() > 0) {
			portNumber = ":" + portNumber;
		}
		String userName = optionsGUI.getUser();
		String password = optionsGUI.getPassword();
		try {
			connection = DriverManager.getConnection("jdbc:jtds:" + serverType + "://" + serverName + portNumber, userName, password);
		} catch (SQLException e) {
			(new ProjectJobException(e)).displayException();
		}
		ShaphanApp.getMainWindow().getSQLEditorsPane().setConnection(new ConnectionDetails(connection, ConnectionDetails.CONN_TYPE_SQL_SERVER));

Leave a Comment

Your email address will not be published. Required fields are marked *