Srikrishna,
The following works for me using JDK 1.4.2, Oracle 9.2.0.4 (on SUN [sparc] Solaris 9) and Oracle's "thin"
JDBC driver.
First, I create a database table with a LONG column:
Then I insert some data into that table:
Note that these first two steps are done using
SQL*Plus (not java).
Now I write some java code to fetch the data from MY_TABLE:
[Note that this is pseudo-code -- it is uncompiled and untested!]
Hope it helps.
Good Luck,
Avi.