How can I fix the query problem ?

Can I get the result from the following ResultSet object ?
ResultSet rs = stmt.executeQuery("SELECT MAX(NO) FROM PLAN");
i.e. How can I get the Maximum one of NO ?

Your example looks OK.
After this you need to fetch the one and only record
if (rs.next()) {...Then get the value of the result, only you know what datatype NO is, I'll assume an int
int maxno = rs.getInt(1);Make sure that the value was not null
if(rs.wasNull(1)) {...and there you have it
Dave

Similar Messages

  • I can't import my iTunes files into pages, how can i fix the privileges problem?

    when i try to import any mp3 file into a pages document, i get an access privileges error saying it is either corrupt, damaged or "can't be used" because I don't have access privileges. This has happened since I moved my iTunes library to an external drive.  Anyone have any solutions?  The privileges on both the library folder, and all its files are set to read and write for sharing and permissions.

    If you do not have done so, set the "Ignore Ownership" flag on the external drive. YOu can set this flag from the "File > Get Info" panel for the drive.
    How is your external drive formatted?
    Can other applications open these mp3 files? QuickTime? Do they play in the Finder preview?
    Do the filenames contain special charcters?
    Léonie

  • HT4995 My iPad 2 Location Service works fine but does not work on my home Airport router. How can I fix the problem?

    My iPad 2 Location Service works fine but does not work on my home Airport router. How can I fix the problem?

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • HT1338 I updated my MacBook Pro with Mountain Lion and now it is starting slow and opening with some of the programs. How can I fix the problem?

    I updated my MacBook Pro with Mountain Lion and now it is slow in starting up and loads a number of probrams. How can I fix the problem?

    Have you tried starting in Safe Mode and see if the slowness still occurs?
    Restart holding the "shift" key.
    (Expect it to take longer to start this way because it runs a directory check first.)
    If this works look in System Preferences > Users & Groups > Login items and delete any third party login items (-), you can always add them back with the (+). Also look in /Library/Startup Items. Nothing is put in that folder by default, so anything in there is yours.
    Reboot normally and test.

  • After upgrading to ios 5.1 on my iphone 3gs, the battery percentage dosent work well, it dosent move. how can i fix the problem?

    after upgrading to ios 5.1 on my iphone 3gs, the battery percentage dosent work well, it dosent move. how can i fix the problem?

    Have you tried doing turning the battery level display off and then General -> "Reset all settings"? You won't loose any data and that should do the trick.

  • I have an iMac with OS Lion. The Smartart feature for Office for Mac will not work when I am logged on to my personal user account. It works with other user accounts on the same computer, and it works after "safe start". How can I fix the problem?

    The Smartart feature of Office for Mac will not work in my user account. It works for all other user accounts on the same computer, and it works after a "safe start". How can I fix the problem?

    You may also want to search/ask in the forums run by the people who make the product which is causing you problems:
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011

  • I exported a pdf file to xlsx file and everything is jibberish. How can I fix the problem?

    I exported a pdf file to xlsx file and everything is jibberish. How can I fix the problem?

    Could you share with us a bit more info about the file?
    Open the PDF in Adobe Reader and choose File > Properties.
    What does it say next to the following lines:
    PDF Producer
    Application

  • My Ipod is disable, How can I fix the problem please help

    My I-pod is disable, how can I fix the problem, Please Help

    If it is disabled because of the passcode, see this article: iPhone and iPod touch: Wrong passcode results in red disabled screen
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software.
    If the issue continues after updating and restoring your device, refer to this document.

  • Secure link to iTunes failed. How can I fix the problem?

    Secure link to iTunes store failed. How can I fix the problem?

    Try resetting the iPod. Nothing is lost and it cures many ills.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.

  • My enternet exploerer facebook page start's up by it's self how can i fix the problem?

    help. my enternet exploerer facebook page start's up by it's self how can i fix the problem?

    Hi readytogo. welcome to the HP Forums. I am not sure exactly what you mean. You say Facebook loads automatically in Internet Explorer (IE). Does this mean, when you first open IE, that Facebook opens? Or do you mean when you turn your computer on, it loads Facebook without being told to? Or are you saying that it is remembering your Facebook login information?
    What is the model number of your product? What version of Windows is installed?
    Guide to finding your product number
    Which Windows operating system am I running?
    Let me know, I look forward to your response.
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • TS1717 Itunes was working earlier and now I receive message that says "the folder "itunes" is on a locked disk or you not have write permissions for this folder" - what is this and how can I fix the problem?

    Itunes was working earlier and now I receive message that says "the folder "itunes" is on a locked disk or you not have write permissions for this folder" - what is this and how can I fix the problem?

    Hey HaydenJulie,
    Thanks for the question, and welcome to Apple Support Communities.
    The following article provides information on permissions issues with iTunes. The troubleshooting steps included may resolve your issue:
    iTunes: Missing folder or incorrect permissions may prevent authorization
    http://support.apple.com/kb/TS1277
    Thanks,
    Matt M.

  • I can't open my gallery after i migrate the iphoto! How can i fix this bad problem?

    HI,
    I can't open my gallery after i migrate the iphoto! How can i fix this bad problem? Flz help me!!

    Try repair permissions with Disk Utility
    Regards
    TD

  • I am new to FCP. I have a canon 60d camera and purchased fcpX. I was recommended to download mgep streamline and convert my files to prores422. I do not have an option for prores 422 in my download. How can I fix the problem.

    I am new to FCP. I have a canon 60d camera and purchased fcpX. I was recommended to download mgep streamline and convert my files to prores422. I do not have an option for prores 422 in my download. How can I fix the problem.Please help. There was another suggestion by vimeo.com to use applexdcam ex 1080p30. I do not have that either in my mpeg download.

    For future reference, you will most likely get more knowledgeable answers if you post in the FCP forum where the folks who use the product regularly hang out:
    https://discussions.apple.com/community/professional_applications/final_cut_pro_ x

  • I keep getting "an error occurred when installing, please run program again" for OS X mountain lion, how can i fix the problem?

    i keep getting "an error occurred when installing, please run program again" for OS X mountain lion, how can i fix the problem?

    The Reset feature adds a folder on your desktop named Old Firefox Data. I recommend hanging onto that for a few weeks in case you discover something essential that the Reset feature left behind.
    This article has a list of what is migrated and what is not during a Reset, in case you're curious: [[Reset Firefox – easily fix most problems]].

  • Safari crashes on my iPad frequently. How can I fix the problem?

    How can this problem be fixed. It is so annoying. I am just reading the newspaper or in Facebook and the app crashes.
    Please, tell me how can I fix the problem?
    It is not only safari. YouTube or Facebook it is the same suddenly crashes.
    Marina

    3 possible cure. Try the easy one first.
    Reset
    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.
    Reset All Settings
    Setting>General>Reset>Reset All Settings
    Erase All Contents and Settings (backup before you proceed)
    Settings>General>Reset>Erase All Contents and Settings

Maybe you are looking for

  • EXECUTE Method of CL_CRM_ERMS_SERVICE_MANAGER not getting "document_id"

    Hi, We have a requirement that on inbound automated email i.e. softbounce the mail should be forwarded to an external email address. We have done required configurations in 1. Transaction SO28 - maintained the recipient for ERMS BOR for the incoming

  • AppleScript Deleting Calendar

    Hello everyone, I have a quick question regarding AppleScript. I got multiple calendars "Untitled 1" "Untitled 2" etc. this goes up to "Untitled 325". I wanted to run a small Apple Script, which would remove those for me automatically. For that I wro

  • I am NEW to Java

    I am reposting this question from another part of the forums. Apparently I started in the wrong place, cuz I was told not to come back until I knew better. I'm taking a Java class right now, and I get most of it, but for some reason, I don't know how

  • 2 analog input and 1 digital

    hi, i attach the vi.. in the following vi i have a problem with the analogs.. when i'm running the vi.. At the results.. olly one of the analog will show me the measuerements.. at the one time maybe the clock analog will give me the results.. and the

  • Problems with sharing a project from Final cut x

    I have just purchased a canon Legria g10 (pal) and when I share(export) the project I get horizontal lines on the image, the raw footage looks fine in quicktime but when I edit and share it back out of Final Cut x it has the lines. Do I need to de-in