I was wondering how I can loop through all records in a database?
I'm using a do while loop to loop through all the records in a database is there a way I can simulate to EOF. I tried something to simulate it but I don't think it'll work. I assume there's a better way.
Here's my code:
boolean noRecords=false;
do
noRecords=false;
if (queryResults.next())
serverOutput.print(queryResults.getInt("itemID");
serverOutput.println(queryResults.getString("itemName");
else
noRecords=true;
}while(noRecords==false);
i think i know what you mean...
try this
while (queryResults.next()) {
serverOutput.print(queryResults.getInt("itemID");
serverOutput.println(queryResults.getString("itemName");
when .next() returns false, it will exit the while loop. you don't need the other code you have there, the above should do it all.
is that what you're after?
Similar Messages
-
Hi! I just bought a new iPhone and I was wondering how i can make sure all my pictures and music will be transfered from my old iPhone to my new one?
Pictures are held in the iPhone backup. If you backup the old device just prior to the activation of the new one, then restore from that backup, the photos will be there. Music is in iTunes on the computer and when you do the restore, it will download the music from iTunes to the device during the restore. Make sure any music purchased on the iPhone that has not been transfered to iTunes on the computer is done before beginning the restore.
You can also view information in this support document http://support.apple.com/kb/HT2109 -
I am sharing a apple id acount with my family but when I synced my iphone to the computer it erased all of my imformation and put the other phone's imformation on it. I was wondering how I can prevent this from happening?
If the ringtones are on the old device just plug it in and do a transfer of purchases then they will be on the computer to sync to the new device.
-
i recently got a new computer and i was wondering how i can i transfer music from my ipod touch to my new computer
See:
Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
or
Recovering your iTunes library from your iPod or iOS device: Apple Support Communities -
I have an ipad 1 and just receive the new one. I was wondering how i can transfer the apps and things that i have on my old one to my new one and keep the same account names and passwords. Or do I have to purchase averything over again.
How to Transfer Everything from an Old iPad to New iPad
http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
Cheers, Tom -
My ipod broke and i have a new computer and i was wondering how I can get my previous purchases on my new computer???
Download Past Purchases
http://support.apple.com/kb/HT2519 -
Hello my name is Nolan, I purchased songs for my iphone on my iphone itunes app, not the itunes on the computer, the first iphone I had broken and i have an replacement I was just wondering if someone can put my songs that I purchased back on my itunes account?
Thank you, Nolan Smith IIYou should have transfered them to your computer.
You buy only one download.
If you are in the U.S. then you can use the newly released beta version of the cloud to get the music
http://www.apple.com/icloud/ -
I need help as fast as possible! i downloaded an app from itunes off of my computer and i can only use it on my computer.
Does anyone know how i can use it on my computer? please help!:)Hi ~
You cannot do that. The apps are specially made for the apple products. If you want to have apps on your computer, find them online somewhere else, pay for them if needed, and use those. You cannot do what you are requesting to do.
Hope I helped! -
Okay so my Macbook Air has always allowed me to receive iMessages from my iPhone 5 to my computer. So basically I could use both to text.. However I just upgraded to the iPhone 6 Plus and I would like the same to happen again with my new phone, but I don't know how. How can my incoming iMessages from my new iPhone 6 plus show up on my laptop?
-I see all the messages from my old iPhone there, but I would like to know how to set it up so that i can view the messages from my new phone.Hi,
If you are signed onto the same iCloud/Apple ID for Messages, then the second number should have been registered with your Messages on the Mac at the time it was verified.
To check this, open Messages on the Mac, click on Accounts, and see if the number is displaying and checked. If it is not, Sign out of Messages on your new device and then sign on again.
Again, phones need to be signed onto the same Messages account that you have set up in Messages.
Cheers,
GB -
How can i Contact apple to find my iPod touch?
- If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
- You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
- If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
- Change the passwords for all accounts used on the iPod and report to police
- There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
- Apple will do nothing without a court order
Reporting a lost or stolen Apple product
- iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number -
I recently bought a new pc, because my old one was trashed. i had all the songs in a external hard drive. i put it on to my new computer but i dont want to manually put those songs back into the playlists that i had. is there a way that i can transfer the playlists from my iphone onto the new computer?
You should migrate your iTunes library instead:
http://support.apple.com/kb/HT4527 -
My daughter has locked her ipod touch and entered the code incorrectly a few times. Is there anyway i can reactivate it again. I have tried to connect it to itunes but it says that i need to put in the code as its in restore mode! that doesnt make sense to me. If you have any help i would appreciated
Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
iOS: Wrong passcode results in red disabled screen
If recovery mode does not work try DFU mode.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
For how to restore:
iTunes: Restoring iOS software
To restore from backup see:
iOS: How to back up
If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
You can redownload iTunes purchases by:
Downloading past purchases from the App Store, iBookstore, and iTunes Store -
I have an iphone and recently got an ipad2. I have two apple ids, which I didn't know (or I created a new account when setting up). So my question is this: When setting up my ipad2 it is under one appleid and my iphone is under my other appleid. Is there a way I can change one to match the other? I would like to be able to share photos between the two and I can't unless they share the same icloud account, right?
Any help is greatly appreciatedWelcome to the Apple community.
In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account") -
I got an iPad 2 and I cannot get my pictures to upload from a micro sd card as the iPad is saying device not accepted using too much power. Can anyone help? My iPad 2 is a 16 gb and my micro sd card is 4 gb
You can use a USB flash drive & the camera connection kit. First download the pics to your computer.
Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
Cheers, Tom -
my music on my phone to my mac
If you still have access to your Old Computer... And to have EVERYTHING as it is Now...
From your OLD computer...
Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
Full Details Here > http://support.apple.com/kb/HT1751
An Added Bonus is that you will have a Backup of iTunes.
If not...
Try these 2 User Tips...
Syncing to a New Computer...
https://discussions.apple.com/docs/DOC-3141
Recovering your iTunes library from your iPod or iOS device
https://discussions.apple.com/docs/DOC-3991
Maybe you are looking for
-
Is it possible to embed query data in javascript at page generate time?
I have a tabular form and I'd like to add a text field onclick event that uses a query column value in the javascript code. Note: I don't want to refer to an html element value. In PL/SQL Server Pages code I'd just put <%= cursorname.columnname %> in
-
OS X 10.8.2 - Disk I/O error triggered by Adobe Application Manager
Hi all, I've been experienceing some issues wince updating from 10.8.1 to 10.8.2 when using Adobe Creative Suite CS5.5 and CS6. Since going onto 10.8.2, everytime I launch Adobe Application Manager to perfom updates and manage my installation my MacB
-
How do I get my mac partition to use GUID partition Table Scheme?
I just bought the upgrade for Mountain Lion on my Macbook pro (Mac OS X 10.6.8). I went to install it and i had partitioned my internal harddrive with bootcamp to run windows 7. I went to select the Macintosh partition and it says that disk does not
-
Tried to mirror my iPad to the tv and got sound but no picture. Can run videos but cannot see I pad screen. Looked on support and it said touch the mirror button but I have no mirror button. What am I missing
-
-Windows 7 -Firefox 3.8.6 -IE 8 -AVG (clean scan) -Spy Bot (clean scan) After downloading Flash 10.1.82.76 both Firefox and IE crash anytime I open a page with any flash video. I have uninstalled flash and reinstalled and still crashes. Any help plea