• Post Reply Bookmark Topic Watch Topic
  • New Topic

making my resultset Updatable and inserting record in table using hashmap  RSS feed

Jack Tauson
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please consider the following code:

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?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!