

                               Overview

This is a sneak peek of a free type 4 JDBC driver for SQLServer and
Sybase.  Currently it has only been tested mostly on SQLServer 6.5.
The driver is not complete yet, but Methods that aren't implemented
will throw a SQLException with the message "Not implemented".

You may get a copy of the current source at 

   ftp://freetds.internetcds.com:/pub/freetds_jdbc

You can get more information about the FreeTDS project at 

   http://sunsite.unc.edu/freetds/

You may send bug reports to 
 
   freetds-jdbc-bugs@internetcds.com





                       Connecting to a Database

The name to use in the Class.forName() is
    com.internetcds.jdbc.tds.Driver
and it accepts any of the following forms of URLs-

   jdbc:freetds:sqlserver://servername/database 
   jdbc:freetds:sqlserver://servername:port/database
   jdbc:freetds:sybase://servername/database 
   jdbc:freetds:sybase://servername:port/database

   jdbc:freetds://servername/database         (These last two forms are 
   jdbc:freetds://servername:port/database     obsolete and should be used.)

The class com.internetcds.jdbc.tds.SybaseDriver is no longer needed
and has been retained only for backward compatibility.  It should not
be used for new code.

Right now unless you specify sybase it defaults to port 1433 for
SQLServer and port 7100 for Sybase.  Generally the port number is
needed for Sybase and is not required for SQLServer.





                  Multiple Statements per Connection

Unlike some JDBC drivers, the FreeTDS driver supports multiple active
statements per connection.  Many JDBC drivers implicitly close
statements before the close() or finalize() are called.  This, IMHO is
incorrect.  The FreeTDS driver keeps the statement (and the associated
database connection) open until you explicitly close it.

What this means is you must call Statement.close() when you are
finished with a statement.  If you don't close it you will leak
database connections and eventually your program will fail with an
error similar to 

      A database manager error occurred.
      SQL State: null

      Logon failed.  Msg 17809, Lvl 14, State 1, Unable to
      connect. The maximum number of '10' configured user
      connections are already connected. System Administrator can configure
      to a higher value with sp_configure.  , Server , Procedure , Line 0

Some commercial programs and Java development tools fail to close
their statements and connections.  IBM's VisualAge for Java for
example provides a com.ibm.ivj.db.uibeans.Select class that is
terrible about creating a new statement for every query and never
closing any of them.





                                Status


Status summary as of September 28, 1999-
   *  I haven't done much with Callable statements.  Since it is
      derived from the PreparedStatement class many portions will 
      work.

   *  The Connection class is mostly implemented.  Code dealing with 
      catalogs, and the warning chain is not implemented.
 
   *  The DatabaseMetaData class still has ~60 methods not implemented.
      I still haven't implemented enough methods to run most visual 
      development tools 

   *  The Driver class is fully functional.

   *  The PreparedStatement class does not have all the data types
      implemented yet.  The warning chain code is not implemented.
      setBytes() is implemented for IMAGE data.  This should give
      some support for people that need BLOBS.
 
   *  The ResultSet does not have all the getXXX() methods implemented
      yet.  getObject() is implemented for all SQLServer datatypes.
      cursors are not implemented.  The warning chain is not implemented
      yet.
 
   *  The ResultSetMetaData class currently implements only-
        getColumnCount()
        getColumnDisplaySize()
        getColumnLabel()
        getColumnName()
        getColumnType()
        getColumnTypeName()
        isCurrency()
        getScale()
        isSearchable()
   
   *  The Statement class is mostly implemented.  It is missing
      cursor support and the warning chain code.  

Query timeouts and the cancel() method are working for SQLServer but
not for Sybase.

Transactions are implemented, but I have not made a thorough code
review yet.  

Multiple result sets from a single query are supported.
