JTDS converting string to NTEXT

I created a callable statement that passes two parameters to a stored procedure. One of them is a string. When the string is larger than 4000 characters it looks like the the driver is converting it to a NTEXT datatype. Since the stored procedure is expecting a VARCHAR I get the following message:

implicit conversion from data type ntext to varchar is not allowed. Use the CONVERT function to run this query.

Any help would be greatly appreciated

[467 byte] By [u77171a] at [2007-9-24]
# 1
I really need help with this one, assigning Duke dollars.Thanks!!!!
u77171a at 2007-7-16 > top of java,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Yes that is why I didn't answer before... I was holding out for dukes.
u77171a at 2007-7-16 > top of java,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

1) A VARCHAR that holds over 4000 characters. Is that even possible?

2) Try the jtds forum at http://sourceforge.net/forum/?group_id=33291 Search through there and the bug list. If what you have isn't there then post a question there. They (the jtds developers) are more likely to see it there then here and be able to give you your answer.

But if I was a betting man I think this is not a bug but that you can't have a VARCHAR with 4000 characters. And if you really need to do something in your proc with it consider using the CONVERT function in your proc as the error message suggests.

u77171a at 2007-7-16 > top of java,Database Connectivity,Java Database Connectivity (JDBC)...