Doing 3 queries in three methods.

Posted on 2006-04-25
Last Modified: 2010-03-31

I have 3 queries
   1. is to get values of some items
   2. See if one of the  value in the table is set to "true"
   3. Update the flag to "false"

Query 1 can not go through until query 2 is successful and the value in table is set to "true"

Now using Resultset and Connection how do I do this in three methods or even in the same method. I dont want to duplicate the
Connection conn==........    code.

Thank you in advance for all the help
Question by:atwork2003
    LVL 8

    Expert Comment

    use sub query
    LVL 30

    Accepted Solution

    Look at the JDBC tutorial for a start:
    LVL 30

    Expert Comment

    LVL 86

    Expert Comment

    Why can't you do

    update x set y = true where y = false


    Author Comment

    Thank you guys for all the help:)

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now