Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Insert Text Datatype in SQL Server via JDBC

0 views
Skip to first unread message

nicol...@hotmail.com

unread,
Dec 14, 2000, 1:46:23 PM12/14/00
to
My question is simple :
How to insert a big string into a field "Text" in Sql Server 7 via
Jdbc/Bridge (If there is there any solution with a Clob object, I don't
find a sample in documentation) ?

I have this error message with this code :
String sql2 = "INSERT INTO f_contient_p (docId, fp_numero,
fp_texte) VALUES (" + docId + ", " + numeroPage + ", ?)";
stmt2 = conn.prepareStatement(sql2);
stmt2.setString(1, textePage);
int nb2 = stmt2.executeUpdate();

The error :
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Troncation Ó
droite de la cha¯ne de donnÚes
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)
at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:1211)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute
(JdbcOdbcPreparedStatement.java:205)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate
(JdbcOdbcPreparedStatement.java:149)
at fr.dhl.facture.Traitement.inserePage(Traitement.java,
Compiled Code)
at fr.dhl.facture.Traitement.scruteEtInsere(Traitement.java,
Compiled Code)
at fr.dhl.facture.Traitement.main(Traitement.java:114)


Nicolas.


Sent via Deja.com
http://www.deja.com/

0 new messages