Re: FW: Variable Length Field with DB2?400

Armin Waibel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi Jay,

Xu, Jie (MED US) wrote:
> Folks,
> 
> 
> We use OJB as the data access bridge to access DB2/400 data in our Web
> application. In some of our DB2/400 tables, we define the variable
> length field, such as VARCHAR(4096) which allow up to 4096 characters.
> We use the following field definition in OJB,
> 
> 
> <field-descriptor
> 
> 
>     id="7"
> 
> 
>     name="screenMsg"
> 
> 
>     column="ALMSGT"
> 
> 
>     jdbc-type="VARCHAR"
> 
>     length="4096"
> 
> />
> 
> But, when try to insert record, "Data truncated" error received with the
> String length only about 160. If the String length is short, we do not
> have the problem. Any suggestion or advices?
> 

OJB doesn't truncate any String objects. I think this is a jdbc-driver 
or DB table issue. Did you checked the DB table, is the column really 
VARCHAR(4096)? Could you post stack trace?

regards,
Armin


> 
> Thank you very much
> 
> 
> "Jay" Jie Xu
> 
> 
> 
> 
> ----------------------------------------------------------------------------
> This message and any included attachments are from Siemens Medical Solutions
> 
> and are intended only for the addressee(s).
> 
> The information contained herein may include trade secrets or privileged or
> 
> otherwise confidential information. Unauthorized review, forwarding, printing,
> 
> copying, distributing, or using such information is strictly prohibited and may
> 
> be unlawful. If you received this message in error, or have reason to believe
> 
> you are not authorized to receive it, please promptly delete this message and
> 
> notify the sender by e-mail with a copy to [email protected]
> 
> 
> Thank you
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.