Q) What JDBC driver should I use for a Microsoft SQL Server database and what are the proper connection strings?

A) Based upon your JDBC driver, here are some sample connection strings (NOTE: all connection strings should be on a single continuous line):

  • JTurbo from http://www.jturbo.com

    "DRIVER=com.ashna.jturbo.driver.Driver;URL={jdbc:JTurbo://hostname:
    port/databasename};UID=username;PWD=password"


    EXAMPLE: If MS SQL Server is running on host www.halcyonsoft.com on the default port (1433) and you want to access the database 'pubs' using the user name 'sa' and password 'admin', the connection string should look like:

    "DRIVER=com.ashna.jturbo.driver.Driver;URL={jdbc:JTurbo:
    //www.halcyonsoft.com/pub};UID=sa;PWD=admin"


  • SPRINTA Type 4 JDBC 2.0 from http://www.inetsoftware.de

    "DRIVER=com.inet.tds.TdsDriver;URL={jdbc:inetdae:hostname:
    portnumber?database=MyDb};UID=username;PWD=password"


    EXAMPLE: If MS SQL Server is running on host www.halcyonsoft.com on the default port (1433) and you want to access the database 'pubs' using the user name 'sa' and password 'admin', the connection string should look like:

    "DRIVER=com.inet.tds.TdsDriver;URL={jdbc:inetdae:
    www.halcyonsoft.com?database=pubs};UID=sa;PWD=admin"

กก

  • Microsoft SQL Server 2000 Driver for JDBC(Type 4 driver) from http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/602/msdncompositedoc.xml

    "DRIVER=com.microsoft.jdbc.sqlserver.SQLServerDriver;url=jdbc:microsoft:sqlserver://hostname:1433;databasename=dbname;user=username;password=password"

    Example: If MS SQL Server is running on host www.halcyonsoft.com on the default port(1433) and you want to access to database 'pubs' using the user name 'sa' and password 'admin',the connection string should look like:

    "DRIVER=com.microsoft.jdbc.sqlserver.SQLServerDriver;url=jdbc:microsoft:sqlserver://www.halcyonsoft.com:1433;databasename=pubs;user=sa;password=admin"

  • Easysoft JDBC-ODBC Bridge 2000 from http://www.easysoft.com

    "DRIVER=easysoft.sql.jobDriver;URL={jdbc:easysoft://
    HostName:PortNumber/DBName};UID=username;PWD=password"


    EXAMPLE: If MS SQL Server is running on host www.halcyonsoft.com on the default port (1433) and you want to access the database 'pubs' using the user name 'sa' and password 'admin', the connection string should look like:

    "DRIVER=easysoft.sql.jobDriver;URL={jdbc:easysoft://
    www.halcyonsoft.com:8831/pubs};UID=sa;PWD=admin"

    กก


Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.