JDBC driver: ntext data cannot be sent...

Stephanie Lewis slewis at thinweb.com
Fri Aug 11 15:44:00 EDT 2000


Anyone have any thoughts?

I'm getting the following error when trying to retrieve data of type
ntext:

              java.sql.SQLException: ntext data cannot be sent to
clients using DB-Library(such as ISQL) or ODBC earlier than 3.7or
earlier.

I'm using SQL Server 7.0 on WindowsNT Server, and have compiled the
"freetds.jdbc.snapshot.zip" taken from the FreeTDS site that was dated
Aug 4/2000. The FreeTDS driver is being run on WindowsNT WorkStation. I
changed the following code in an attempt to solve the problem:

                             In Tds.java I changed the line:
private int     tdsVer       = Tds.TDS42;

to:         private int     tdsVer       = Tds.TDS70;

           In TdsComm.java I changed the same line.

In Tds.java I also changedin  the logon()  method:          // tds
version

comm.appendByte((byte)4);

comm.appendByte((byte)2);

comm.appendByte((byte)0);

comm.appendByte((byte)0);


to:              // tds version

comm.appendByte((byte)7);

comm.appendByte((byte)0);

comm.appendByte((byte)0);

comm.appendByte((byte)0);


and:          // prog version

comm.appendByte((byte) 6);  // Tell the server we can handle SQLServer
version 6

comm.appendByte((byte) 0);  // Send zero to tell the server we can't
handle any other version

comm.appendByte((byte) 0);

comm.appendByte((byte) 0);


// prog version

comm.appendByte((byte) 7);  // Tell the server we can handle SQLServer
version 6

comm.appendByte((byte) 0);  // Send zero to tell the server we can't
handle any other version

comm.appendByte((byte) 0);

comm.appendByte((byte) 0);

Any help would be greatly appreciated,

Cheers,
               Stephanie






More information about the FreeTDS mailing list