I use Sybase ASE 12.5.3 and a table with text data field, "email_body".
However, when I use JConnect to add data to this field, I use
PreparedStatement.setString(2, content)
to add string data into this field. But I found only NULL is found in this
field.
Actually, I tried this before and it should work. I do not know why it
becomes not working now...
I am really confused now...what should I do to fix this? Can anyone help me?
Thanks,
Raymond
I found that when saving a "simple" long string with
PreparedStatement.setString(2, content)
into a "text data type. Then the JDBC method should be fine without any
problem found.
But when I need to save a long HTML which contains chinese characters in it,
then it seems
PreparedStatement.setString(2, content) works in the 1st time, then I try
2nd time,
it produces :
Attempt to insert NULL value into column 'email_body', table
t_doc_template'; column does not allow nulls.
Does anyone encounter such situration?
I am using thie JConnect version:
JDBC(TM)/6.05(Build 25828)/P/EBF13044/JDK14/Fri Sep 30 1:05:16 2005
Please kindly help,
Thanks,
Raymond
"Ray" <l...@hotmail.com> wrote in message news:4b589c56@forums-1-dub...
"Ray" <l...@hotmail.com> wrote in message news:4b59269e@forums-1-dub...
Caught IOException: com.sybase.jdbc3.jdbc.SybConnectionDeadException: JZ0C0:
Connection is already closed.
It seems the connection is already dead.
"Ray" <l...@hotmail.com> wrote in message news:4b59269e@forums-1-dub...
Database product version : Adaptive Server Enterprise/12.5.3/EBF 13325
ESD#7/P/Sun_svr4/OS 5.8/ase1253/1951/64-bit/FBO/Fri Mar 24 11:00:22 2006
[1/22/10 14:59:48:453 CST] 00000027 InternalSybas I DSRA8205I: JDBC driver
name : jConnect (TM) for JDBC (TM)
[1/22/10 14:59:48:453 CST] 00000027 InternalSybas I DSRA8206I: JDBC driver
version : jConnect (TM) for JDBC(TM)/6.05(Build 26573)/P/EBF17377/JDK14/Mon
Nov 16 6:40:09 2009
But it produces the same exception.
"Ray" <l...@hotmail.com> wrote in message news:4b592c84@forums-1-dub...
//stmt.setString(7, emailbody);
StringReader reader1 = new StringReader(emailbody);
stmt.setCharacterStream(7, reader1, emailbody.length());
Is it the limitation of JConnect 6.05 driver?
"Ray" <l...@hotmail.com> wrote in message news:4b594e79@forums-1-dub...
Check the jConnect samples - there should be a way
to do this. There are samples using AsciiStream and BinaryStream
as well as using the ASE text pointers (a good way to do it - but this has
potential to change or become antiquated
in the future).
If that doesn't help you should open a Tech Support case.
Thank you,
-Paul
"Ray" <l...@hotmail.com> wrote in message news:4b594ed1@forums-1-dub...