Java in General (beginner)
Java in General (beginner) No question too simple or small . . .
equivalent of bigInt in java
Hello,I'm a beginner in java. I'm trying to get results back from a table that has int and bigint value. i know how to get int value.code:int i = 0;i = rs.getInt(1);How do i get the bigInt back.? Thanks.Mala
I believe the object type you're looking for is "BigInteger."http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.htmlSo you would have something like:BigInteger bigI;bigI = ...; //might require a cast(Or am I misunderstanding your question?)--------------------"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Hi Mala,To retrieve bigint, it's recommended by theSun Java Tutorial: JDBCto use getLong().code:Long value = rs.getLong(1);Joyce[ October 29, 2004: Message edited by: Joyce Lee ]
Moving this tothe JDBC forum...[ October 29, 2004: Message edited by: Dirk Schreckmann ]--------------------[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]