INTRODUCTION
------------

This version of the jTDS driver has been redeveloped around a new network core
designed to support the 4.2, 5.0, 7.0 and 8.0 versions of the TDS protocol.

Adding support for version 5.0 greatly improves the options for supporting
Sybase servers. Specifically, the driver is now able to use lightweight stored
procedures to implement prepared statements. This removes the administration
overhead of manually dropping stored procedures created by the driver.

The support for TDS8 provides native support for the SQL Server 2000 bigint data
type, for sql_variant, for user functions returning non-integer values and for
collations.

This driver incorporates the single connection sharing code introduced with the
previous version of the driver; however, the TDS pool has been removed and each
statement now gets it's own dedicated TDS stream which is retained until the
statement is closed. If execution of statements is overlapped, a new statement
forces the caching of an incomplete one. Statements that return large results
sets are automatically cached to disk once the in memory threshold has been
reached.

New connection properties have been added to allow the user to specify the
network packet size with Sybase and SQL Server 6.5 (previously this defaulted
to 512 bytes). The server language can also be set. Finally there is an option
to disable the generation of stored procedures for prepared statements.
If this option is selected sp_executesql is used for MS SQL server 7 and up,
dynamic SQL is used for Sybase and text substitution (into the SQL statement)
is used for SQL 6.5.

This driver builds on the ability to stream large objects directly to the server,
introduced in the last version of the driver, by allowing large objects to be
read directly from the server via an InputStream or Reader. This is achieved
through the use of the READTEXT Transact SQL statement. This means that with care
it is possible to use the driver to read or write the largest text and image
objects with minimal memory usage on the client. This feature is enabled by
calling setMaxFieldSize(1) on the relevant statement.

The SQL Exception error messages, connection properties and property descriptions
used and displayed by the driver are all loaded from a resource file. This allows
the text to be altered easily or additional resource files added to localise the
messages. In a similar way the character set mappings are also loaded from a
resource file. To improve compliance with the JDBC standard, the driver now
issues a DataTruncation exception when character or binary data is truncated.

The driver supports the enabling of logging via the JDBC standard methods in the
DriverManager and DataSource classes. The driver also supports login timeouts
specified through standard method calls on the same classes.

As noted above, this revised code base is basically a re-implementation of the
ideas in the original driver. I can only really claim credit for all the typing!
The authorship has been recorded in the class files, partly to identify the
added or changed ones but mostly to give due credit to all those others that have
contributed to this project over the years. It is not always easy to tell
who wrote what so if I have left anyone out please accept my apologies.


TO DO LIST:
-----------

 1. Urgent need to review synchronization and thread safety.

 2. Code review looking for resource leaks especially in a java enterprise
    environment.

 3. Review and test statement cancellation logic.

 4. [Completed] Review data type conversion logic.

 5. [Completed] Some independent performance testing would be wise. The goal is for this code
    to be at least as fast as the original.

 6. [Completed] Add support for Sybase varchar and varbinary columns > 255 bytes
    in length.

 7. [Completed] The Microsoft server side cursors are not very efficient. A
    simple forward only cursor with a fetch size > 1 would be useful for
    iterating through large result sets where otherwise the driver would be
    forced to cache large result sets.

 8. The READTEXT LOB logic is experimental and probably not very efficient from
    the server's perspective. It may still be worth investigating streaming
    directly from the TDS data like other drivers do even though this places
    constraints on the way in which columns are accessed.

 9. Because Sybase does not support (as far as I know) text and image parameters
    there is no efficient way of writing LOBs. One option is to explore the use
    of WRITETEXT in this case?

10. [Completed] Make use of collation information for translating SQL 2000
    Unicode to local character sets.

11. [Completed] Add updateable (and possibly scrollable) cursor result sets for
    Sybase.

12. [Fixed 6/29/2004]
    Check if the savepoint logic can sometimes delete temp stored procedures when
    rolling back to a savepoint.

13. Check to see if Sybase lightweight procedures are rolled back like normal ones.

14. [Completed] Set textsize manipulation via the setMaxField size method call
    affects the text size for all statements. Ideally it should only affect the
    current result set.

15. With TDS8, sql_variants is handled as a separate data type exposing the
    underlying data type to getObject(). This does cause some semantic problems
    with for example, result set meta data. Other drivers always convert
    sql_variant to varchar. Question is should jTDS or is the extra functionality
    useful?

16. Review the whole character set translation code and approach. Not sure that
    the driver always does the correct thing but difficult for one ASCII
    compatible person to fully test...

17. Diagnostics need improvement. More error conditions should be trapped to
    protect against unimplemented or misunderstood aspects of the TDS protocol.
    Would be very useful to clean up and reorganize tests, make Sybase pass the
    suite (by removing not applicable tests and modifying those that could and
    should work).

18. The Logger output is a bit all or nothing at present. Could possibly do with
    extending the diagnostic messages and providing an option to disable packet
    tracing in isolation.

19. It would be handy to extend the NTLM authentication mechanism to be able to
    connect using Windows authentication to a local server running on a workstation
    that is not in a domain.

20. Some other drivers support the serialisation of Java objects to/from the
    server. Is this a facility that would be useful or does software like
    Hibernate make it redundant?

21. It could be advantageous to add properties for tuning the SharedSocket
    parameters that control the cache to disk size and minimum packets in memory.

22. The driver is about 10KB larger than version 8rc1, which seems reasonable
    given the extra functionality. Even so the code could benefit from review
    and possible re-factoring to slim things down a bit.

23. [Completed] Implement the XA classes to make this driver more generally
    useful in java enterprise environments.

24. More regression testing. The driver passes the test suite but needs more real
    world exposure before it is ready for the big time.

