Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / April 2006

Tip: Looking for answers? Try searching our database.

PLZ help me out

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
situ - 17 Apr 2006 07:29 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.