Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

IP Address + SQL

losintikfosDec 4 2008 — edited Dec 4 2008
Hi Guys,

I have a List defined to hold IP addresses i intend to fetch from my database table;
 ArrayList<InetAddress> ipublicip = new ArrayList<InetAddress>();
My problem is if i do;
ipublicip.add(rs.getInt(4));//which is the IP address field on the table
There's a type mismatch issue there, was wondering if anyone know how to get the IP address and pass it to the List without any issues.


The addresses are stored on the table using inet datatype.

Expert ideas please.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2009
Added on Dec 4 2008
6 comments
502 views