• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Putting SQL results into a java variable

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic