> ------------------------------
> 
> message: 6
> date: Thu, 28 Oct 2004 11:13:25 -0400
> from: Marshall Dunbar/DPS <marshall@xxxxxxxxxxx>
> subject: Re: Inserting packed values into a DB2/400 table via JDBC
> 
> You are making things way too difficult.  The SQL processor on the 400 
> will take care of packing the data for you.  Just create an SQL string 
> containing:
> 
> INSERT INTO IT005P (ITEM_NUMBER) VALUES(47001)
> 
> and execute it.

Hi Marshall

Thanks for the suggestion-- I had already tried that, and received the
following:

SQL Statement = INSERT INTO IT005P (ITEM_NUMBER) VALUES(47001)

Error: [SQL0408] Value for column or variable ITEM_NUMBER not compatible.

Which is why I was wondering if I needed to do some sort of typecasting or
conversion for the INSERT Statement.  ITEM_NUMBER is a 7-position, 0 decimals
packed field.

Any other ideas greatly appreciated.

Thanks.

-Ed

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.