467,189 Members | 1,210 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,189 developers. It's quick & easy.

PLZ help me out

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

Apr 17 '06 #1
  • viewed: 1163
Share:
3 Replies
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
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 17 '06 #2
i have done that,the text what i'm passing contains data of 6KB but
still i'm getting the same error

Apr 17 '06 #3
situ wrote:
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

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.