making my resultset Updatable and inserting record in table using hashmap

Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

As seen in some part of my commented code, I was using MainConnection and harcoding the IP addresses before. But since, my query is getting all the eligible(IPStatus = 1) IP addresses,I don't need to hardcode them anymore
and hence I am using Map interface to store the eligible IP addresses as shown above.

Problem I am encountering are as follows:

1) When I was using MainConnection and hardcoded IP addresses, I was using something like the following to make my resultset updatable:

But, considering the fact that I am no longer using the Mainconnection thing, how should I do the same thing with the Resultset now using the HashMap?

2) Similarly, if we go further down the code, in the QueryStringInsertFromRemote , I am inserting the value of the IP address for which the connection has been established at that very moment. Please let me know how can I
overcome with these problem as I am using HashMap here?

3) 1) Considering the fact that I am not hardcoding IP addresses, do I need the while loop now?