• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Putting SQL results into a java variable

 
Heather Mink
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have exhausted every resource at my disposal and have yet to find an answer to my problem. I am creating a simple applet for a small library in my community. It interfaces with an MS Access database. I have figured out how to query the database in jave, but I can't figure out how to take that information and put it into variable that I can use for comparison purposes. Basically, I am doing a Select (count) statement and I need to work with the count value to determine the proper course of action that the applet should take. Please help.

Thanks in advance,

Heather
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Heather,

I assumed that you are doing something like this for querying stuff.



you just have to get the results from "rs", ResultSet. you can do like,



It would probably work in your case. for more please read the docs.
 
Heather Mink
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. I had the result set, I was just stuck at that point. You were right on the money. I appreciate it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic