Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Treatment of SMALLINT in Java Program

Question posted by: Mark A (Guest) on July 22nd, 2008 05:55 PM
Does a java program treat a DB2 column defined as SMALLINT any different
than INT?

In other words, if I changed a column from INT to SMALLINT, would that
require any java coding change?


Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
jefftyzzer's Avatar
jefftyzzer
Guest
n/a Posts
July 22nd, 2008
07:05 PM
#2

Re: Treatment of SMALLINT in Java Program
On Jul 22, 10:53 am, "Mark A" <nob...@nowhere.comwrote:
Quote:
Originally Posted by
Does a java program treat a DB2 column defined as SMALLINT any different
than INT?
>
In other words, if I changed a column from INT to SMALLINT, would that
require any java coding change?


While IBM recommends that you map INT to int and SMALLINT to short
(http://www.ibm.com/developerworks/d...cle/dm-0510law/
index.html), as long as your Java data type remains the larger of the
two--namely, int--then there should be no issue with such a change.

--Jeff

 
Not the answer you were looking for? Post your question . . .
182,371 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors