By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

PLZ help me out

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.