Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes equivalent of bigInt in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "equivalent of bigInt in java" Watch "equivalent of bigInt in java" New topic

equivalent of bigInt in java

Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
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.

How do i get the bigInt back.? Thanks.

marc weber

Joined: Aug 31, 2004
Posts: 11343

I believe the object type you're looking for is "BigInteger."

So you would have something like:

BigInteger bigI;
bigI = ...; //might require a cast

(Or am I misunderstanding your question?)

EDIT: I see I misunderstood. I didn't realize that rs was a ResultSet.
[ November 01, 2004: Message edited by: marc weber ]

"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
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Hi Mala,

To retrieve bigint, it's recommended by the Sun Java Tutorial: JDBC to use getLong().

[ October 29, 2004: Message edited by: Joyce Lee ]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the JDBC forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Joyce Lee:

To retrieve bigint, it's recommended by the Sun Java Tutorial: JDBC to use getLong().

cent percent Agreement. there is no better substitute.
subject: equivalent of bigInt in java
It's not a secret anymore!