Home > Archive > SQL Server JDBC > April 2006 > Row Insert Failed with ResultSet









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Row Insert Failed with ResultSet
CK4

2006-04-05, 3:23 am

SQLServer 2000 Database with SP4
fields [content] type is "text"
code below:
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D
String strGUID =3D dbConnBean.getGuid();

strSQL =3D " select RepID,Title,Content from OA_Report where
RepID=3D'' ";
rs =3D dbConnBean. runSQLReturnRS_RW(st
rSQL);

rs.moveToInsertRow();

rs.updateString("RepID",strGUID);
rs.updateString("Title",objMod.getTitle());
rs.updateString("Content", objMod.getContent());

rs.insertRow();

dbConnBean.closeResultSet(rs);
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D
when objMod.getContent() get the string is very long=A3=A8ex. the whole
string length is 2137=A3=A9, rs.insertRow() reports wrong.

JavaException
com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own Source)

[Microsoft][SQLServer 2000 Driver for JDBC]Row insert failed.

=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3
D=3D=3D=3D=3D
How could i do?

Thx.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com