Checking values in a loop, any help would be great

Am having a right messy time trying to solve the following problem.
tring to stop the same question appearing by checking the new random question agains the questions in a db. if it already on the db it get another randomQuestion from another source. But up to now it's not checking it right and still coming out with questions that are already stored on the db. any helpful hints would be very grateful. also very new to java so bare with me.
String newQuestion=ClientCommunication.getRandomQuestion();
s.execute("SELECT * from questions"); // select the data from the table
ResultSet rs = s.getResultSet(); // get any ResultSet
StringBuilder results = new StringBuilder(900);
if (rs != null) // if rs == null, then there is no ResultSet to view
while ( rs.next() ) // this will step through data row-by-row
results.append(rs.getString(2));
results.append(System.getProperty("line.separator"));
if(newQuestion.equals(results.toString()))
newQuestion=ClientCommunication.getRandomQuestion();
questionLabel.setText(newQuestion);
answerField.setText("");

though the string would hold all the questions and the loop would check through them to see if anything matched. just findthing this abit hard to get my head round sorry.
"single question maybe should be matched to a single row result" like have each question on a new row ?
ta for your time
chris mon

Similar Messages

  • I have GarageBand for iPad 2 and noticed that there are far fewer loops for iPad than for apple laptops. Is there a library available of apple loops? I haven't been able to find any if there are. Any help would be greatly appreciated.

    I have GarageBand for iPad 2 and noticed that there are far fewer loops for iPad than for apple laptops. Is there a library available of apple loops? I haven't been able to find any if there are. Any help would be greatly appreciated.

    Update: An Apple rep called me today to update the status of my return. I was told that the replacements for the BLACK iPad 2's was still another 3 weeks out (at least) so they offered me a brand new WHITE 16GB iPad 2. I could have that or continue waiting. I opted to go ahead and accept the offer of a new white one. Worst case scenario if I don't like the white one I have buddy that just bought a 16GB black one that he would be willing to swap it.

  • I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly app

    I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly appreciated.

    Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
    var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
    var subtotal=0;
    for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
    nfSubtotal.rawVlaue=subtotal;

  • I have been trying to set a new voicemail greeting on my iphone 4s but every time i check the 'save' button it says Voicemail Unavailable, try again later. Any help would be greatly appreciated! thanks

    I have been trying to set a new voicemail greeting on my iphone 4s but every time i check the 'save' button it says voicemail unavaliable, try again later. Really do not know what else to try. Any help would be greatly appreciated! thanks

    Voicemail is a Carrier feature... Contact your Carrier...
    But first... Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • When I use IWeb for my blog, many people claim they are unable to use the comment window, claiming they get an "error" message.  I have check "allow comments" on the appropriate page.  Any help would be great.

    When I use IWeb to post my blog, many readers claim they are unable to post a comment.  When they attempt, they receive an "error" message.  I have check and re-checked that "allow comments" is checked in the appropriate window.  Any help would be greatly appreciated.

    You can publish your blog on any server but will lose the commenting capability.  Since you'll have to find a new host soon anyway since MMe will go away on June 30, you might consider converting your blog to WordPress as that's the only  other blog type that an MMe blog can be converted to and keep it's comments, etc.  Rage Software has create an application that will convert an iWeb blog to WordPress: Convert Your iWeb Blog to a WordPress Blog | iWeb to WordPress. That way you can keep your blog's continuity.
    This may be of some additional help to you: Life After MobileMe.

  • How do I view what slide I'm on out of how many I have total in keynote? I know on powerpoint it's at the bottom right of the window but I can't find it on keynote nor can I find the option to make it appear. Any help would be greatly appreciated.

    How do I view what slide I'm on out of how many I have total in keynote? I know on powerpoint it's at the bottom right of the window but I can't find it on keynote, nor can I find the option to make it appear. Any help would be greatly appreciated.

    Your steps so far are OK but you may want to try:
    1 Trash your user library Caches folder (House Icon with short name in Finder window (hard drive window)GOTO:House icon > Library folder > caches folder
    2 Trash the com.apple.Safari.plist file in User library > preferences folder > Safari.plist as well as removing the library Safari folder its self.
    3 you can selectivly re-install Safari 2.0 from your OS Tiger Install disk 1, (see Knowledge base article 301229 for how to just select the Safari Application) without doing a complete system Archive and Install.
    4. Create a new Test user account on the system and test how Safari responds in the Test user, see if its a user related issue and not system issue.
    5. Still no Safari response? have to do an Archive and install (not preserving user and network settings)article 107120
    PS. Issue may be related to actual internet connection connectivity, power cycle cable modem and router or airport if using one as well as the computer(keep unplugged for 3-5 min) and plug the cable modem in and then the router/airport then power on the computer. Do the Airport Admin utiliy (applications, utilities on HD_1)update.
    - do a hard reset of airport knowledge base article 108044(Express base) and 107451 (Extreme base)
    - Check with internet provider for connection issues "cannot find server" ect.

  • HT1338 When trying to update getting (error surle error domain error-1100). It started yesterday, any help would be great. I have Mountain Lion 10.8.1 on a new macbook pro with retina display.

    When trying to update getting (error surle error domain error-1100). It started yesterday, any help would be great. I have Mountain Lion 10.8.1 on a new macbook pro with retina display.

    There are many people suffering from this problem right now (including me). It appears to be a server issue. Just wait and try checking for updates again tomorrow.
    Some things I have heard indicate that this may be a regional problem, though what parts of the world are affected I don't know yet. A few people have been helped by deleting the following preference file (paste the path into the Go -> Go to Folder window in the Finder to locate it), though most have not:
    ~/Library/Preferences/com.apple.SoftwareUpdate.plist
    Note that if you are trying to download iTunes 10.7, that can be found here:
    http://support.apple.com/kb/DL1576
    Also, note that there is no reason to be anxious to get it, as the only thing added in iTunes 10.7 is compatibility with iOS 6, which will not be available until the 19th, and the new iPhone, which will not be available until later as well. The new iTunes that was announced is iTunes 11, which is also not yet available.

  • Safari will not launch- any help would be greatly appreciated

    This past week my safari began to fail to launch. It worked fine monday, on my friends home wireless. However when we booted it up Tuesday at our home-also wireless- it would not open. All other internet access works fine-ie ichat, itunes etc., but we can't get it to open with anything. When you click the icon it bounces as it were about to launch but never gets the black carrot under it. I opened the system activity monitor, and it also does not show it launching. I attempted to reinstall it using the number 2 setup disk, but that didn't seam to make a difference. It also will not launch if clicking on a saved html file nor on a hyperlink.... I tried moving the safari file folder and preferences file out of the library onto the desktop and restarting it(I had read that on a different post) but that had no effect...As I am used to working on a plain old IBM computer I'm not sure how else to trouble shoot the mac as its my girlfriends... any help would be greatly appreciated as we can't access the internet on hers to even download netscape or internet explorer

    Your steps so far are OK but you may want to try:
    1 Trash your user library Caches folder (House Icon with short name in Finder window (hard drive window)GOTO:House icon > Library folder > caches folder
    2 Trash the com.apple.Safari.plist file in User library > preferences folder > Safari.plist as well as removing the library Safari folder its self.
    3 you can selectivly re-install Safari 2.0 from your OS Tiger Install disk 1, (see Knowledge base article 301229 for how to just select the Safari Application) without doing a complete system Archive and Install.
    4. Create a new Test user account on the system and test how Safari responds in the Test user, see if its a user related issue and not system issue.
    5. Still no Safari response? have to do an Archive and install (not preserving user and network settings)article 107120
    PS. Issue may be related to actual internet connection connectivity, power cycle cable modem and router or airport if using one as well as the computer(keep unplugged for 3-5 min) and plug the cable modem in and then the router/airport then power on the computer. Do the Airport Admin utiliy (applications, utilities on HD_1)update.
    - do a hard reset of airport knowledge base article 108044(Express base) and 107451 (Extreme base)
    - Check with internet provider for connection issues "cannot find server" ect.

  • I have two iPads and one is connected to the internet but my other iPad was connected then was not and since then I have not been able to add my internet back onto my iPad it only says cannot connect to the server any help would be great thanks

    I have two iPads and one is connected to the internet but my other iPad was connected then was not and since then I have not been able to add my internet back onto my iPad it only says cannot connect to the server any help would be great thanks

    If you are having WiFi problems it is necessary to isolate whether the problem is with your network or your iPad. Note: Do NOT consider your network to be blameless if some other devices can connect to it.
    First, test your iPad on some other WiFi networks: a friends, Starbucks, Barnes &amp; Noble, etc.
    If it works well there then the problem is probably with your network. Try restarting your WiFi router by removing power for 30 seconds. If that does not help check for a firmware update for your router. If none exists which corrects the problem consider replacing the router.
    If your iPad does not function well on other networks it possibly has a hardware problem. You could try Settings > General > Reset > Reset Network Settings to see if that corrects the problem. If not, contact Apple Support or visit an Apple store for evaluation. They can provide a replacement if your iPad is bad.
    If you need more help please give the make, model, and version of your WiFi router and how you have it configured.

  • Help! I deleted my System preferences by mistake! I'm absolutely positive they are gone. Unfortunately so are the disks that came with it. I'm using an Imac with os 10.4.11. Any help would be greatly appreciated!

    Help! I deleted my System preferences by mistake! I'm absolutely positive they are gone. I checked spotlight, blue apple and the hard drive, applications. Gone. Unfortunately so are the disks that came with it. I'm using an Imac with os 10.4.11. Any help would be greatly appreciated!

    Try cleaning the disc, and be sure you have the right one.
    If that doesn't help, it sounds like it's time for a trip to the Apple Store. 
    Make an appointment here:  http://www.apple.com/retail/geniusbar/

  • I can't play videos (youtube for example) unless it is in full screen mode. The audio works in either, but the video only shows in full screen. Any help would be greatly appreciated.

    I can't play videos (you tube for example) except in full screen mode. The audio works in either, but the video doesn't load or run in the normal you tube web site.
    Any help would be greatly appreciated.
    Thanks
    Also, the error console shows all sorts of different errors. Though, alot of error parsing values.

    Do you have any Mail plug-ins? In particular, do you
    have any plug-ins installed on one computer but not
    the other? In the Finder, go to each of the following
    folders (if they exist). What do you see there?
    /Library/InputManagers/
    Not Found
    /Library/Mail/Bundles/
    Not Found
    ~/Library/InputManagers/
    Smart Crash Reports Folder / Smart CrashReports.bundle
    ~/Library/Mail/Bundles/
    MailRecent.mailbundle
    > I have a number of Mail Rules in
    place which place messages
    of certain topics in specific Smart
    Mailboxes
    This doesn’t make sense to me. You cannot tell a rule
    to move messages to a smart mailbox, only to a normal
    mailbox. Each smart mailbox has its own set of
    conditions that messages must satisfy in order for
    them to appear there.
    OK. I misstated this. I have a number of Smart Mailboxes with their specific rules in which to route certain topics to specify mailboxes. I am trying to not have to create each Smart Mailbox on each computer.
    The problem is that when I am on the road I add contacts, bookmarks, keychain items, contacts into my laptop and vice versa when home. I would just like to have those Sync on both computers. Seems like it should be easy, but it hasn't been.
    I really don't think I have anything "non-standard." A few Smart Mailboxes, a couple of signatures, thats pretty much it.
    Note: For those not
    familiarized with the ~/ notation, it refers
    to the user’s home folder. You can easily locate any
    of the folders referred to in this post by copying
    the folder path here, doing Go > Go to Folder
    in the Finder, and pasting the folder path
    there.

  • I have an iphone 5, and the battery is so bad! I was just wonder if anyone had used an external battery before? are they good? can they do damage to your phone? what's the best one to get? any help would be great thanks!

    I have an iphone 5, and the battery is so bad! I was just wonder if anyone had used an external battery before? are they good? can they do damage to your phone? what's the best one to get? any help would be great thanks!

    I'd just like to say that ahs70's post on Dec 1, 2013 at 1:17am on Pg. 9 worked for me as well: https://discussions.apple.com/thread/5338609?start=120&tstart=0
    If your iPhone's battery is acting up you need to determine if it's a software issue or a hardware/battery issue.  To do that, after syncing your iPhone, erase/hard reset all data and settings from your iPhone to what it was from the factory as new.  This can be found in Settings/General/Reset/Erase All Content and Settings.  Then test it out for a day or two.  If it's still acting up then it's likely a hardware issue and you will need to get your battery replaced.  If your warranty is done than check out this link to get a battery kit to replace your iPhone battery yourself:  http://www.ifixit.com/Store/iPhone/iPhone-5-Replacement-Battery/IF118-001#produc tDescription
    If your iPhone is now working properly after hard resetting it than it's most likely a software issue.  This battery issue only started after upgrading to the new iOs7, so it is obviously related to the update not properly installing itself.  What has worked for me and many others is to manually update to iOS 7.0.4 using the full downloaded version of the update which is about 1.32 Gigs.
    But first you need to find out what model of iPhone you have, click here to determine if it's GSM or CDMA: http://support.apple.com/kb/HT3939?viewlocale=en_US&locale=en_US
    Then go here and scroll down to download the iOS 7.0.4 complete update for your device:  http://www.downloadios7.org/download-ios-7-0-4-ipsw-file.html
    Then scroll up on the download page and follow the instructions of updating your iPhone manually following the instructions below:  "IPSW with iTunes"
    And your done.
    Problem solved.
    I only posted this because it was a very frustrating problem that no one really seemed to figure out a solution for.
    I hope this helps.
    Emile Beaulieu

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • Help !!  I am trying to uninstall and then reinstall itunes but when I try to remove itunes it I get error message ~ the feature you are trying to use is on a network resource that is unavailable?????  Any help would be great:) !!

    Help !!  I'm trying to un install and then re-install itunes.  I get erroe message ~ the feature you are trying to use is on a network resource that is unavailable????  Any help would be great!   TXs!

    See if this previous discussion will help.  It is markd as solved:
    I am trying to uninstall itunes as it will not open error 7 (windows 126) so that I can reinstall but keep getting the message.. The feature you are trying to remove is on a network resource that is unavailable itunes.msi... Any suggestions anyone
    It was the one with the green checkmark on the right side of this page.

  • I have an IMac.  I put a folder on the desk top and now want to delete it.  The folder seems to be locked.  I went to get info and tried to unlock it but still can't delete it.  The folder has nothing in it.  Any help would be great.  Thanks

    I have an IMac.   I put a folder on the desk top and now want to delete it.  The folder seems to be locked.  I went into Get Info and attemted to unlock the folder and delete it.  Won't go away.   There is nothing in the folder.   How do I unlock this folder and delete it?   When I try to delete it, I'm asked for my password which I put in and is accepted, but will not delete the folder.  Any help would be great.

    If you are sure there is nothing in it, download trashit, a useful free app.   That will dispose of it.
    Download Trash It! for Mac - Force-empty your trash can. MacUpdate.com

Maybe you are looking for

  • How do you make a voice sound "creepier" in SP

    Anybody know a process filter or group of filters to make voices sound creepier? Thanks.

  • IDOC Inbound and Outbound

    Please let me know How to handle IDOC inbound and Outbound preferably with example. I am new to it.

  • How increase number of elements of page item?

    Hi, i need view more than 25 rows ina page item. Is it possible? And when select <more> in list of values, open a new window to select the value, is it possible increase the number of rows show? Thanks.

  • Multiple Hierarchies on single characteristic in BEx

    In BEx 3.5 Is there a way to display multiple hierarchies/groups on one characteristic? For example, reporting by a Cost Element with several child hierarchy subgroups from differnt parents. An orphanage if you will. I try that and the fisrt group di

  • InDesign Server configuration and fonts

    When you start multiple instances of InDesign Servers you specify the different configuration names. Is it possible that 2 instances of InDesign Servers running on the same server with different configuration names have different fonts installed? I.e