hi all,
i have table structure like below
CREATE TABLE T1(
ID INTEGER NOT NULL ,
STORY CLOB(1048576) NOT LOGGED NOT COMPACT)
IN "USR_MANAGEMENT_DAT"
LONG IN "LONG_TSPCE_02_DAT"
where USR_MANAGEMENT_DAT is a regular tablespace and
LONG_TSPCE_02_DAT is a long table spaces
i have one procedure pr_1 which will insert data this table
the structure of this procedure is like this
CREATE PROCEDURE pr_1(p_id INTEGER,p_story CLOB)
SPECIFIC pr_1
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
INSERT INTO T1(id,story)
VALUES(p_id,p_story);
COMMIT;
END P1
here i'm passing a story text into the p_story parameter
but i have encounterd this error
***Exception COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E
String data right truncation. SQLSTATE=22001
would u plz help me in this issue
Serge Rielau - 17 Apr 2006 12:56 GMT
Don't use the default CLOB size:
CREATE PROCEDURE pr_1(p_id INTEGER,p_story CLOB(1048576))
I think the default is 64KB which is too small for your 1MB input.
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
situ - 17 Apr 2006 13:29 GMT
i have done that,the text what i'm passing contains data of 6KB but
still i'm getting the same error
Serge Rielau - 17 Apr 2006 15:43 GMT
> i have done that,the text what i'm passing contains data of 6KB but
> still i'm getting the same error
Hmm, you need to find out whether the CALL or the INSERT is at fault.
Remove the INSERT and check whether the warning goes away.
(or you step through the debugger)
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab