This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes update db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "update db" Watch "update db" New topic
Author

update db

duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64


this is the class by which i can get the trackId of the song present in the db.




this is the class to get the trackId of the songs which are currently in the xml file.

now i want to compare those two different trackId and if there is any update in the xml (i.e. entry of the new song with different trackId or deletion of old song) after which trackId will not match each other then change accordingly in DB via sql query through java. please guide me about how can i be able to compare those trackid one by one and make the program further. i also wan to do that in the separate thread class which continously do the same task.

thanks in adavance.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11350
    
  16

I doubt you will get much help here with a post like that. If you haven't read it, you should probably check out the entries in our HowToAskQuestionsOnJavaRanch (<--click that) FAQ. Generally speaking, overly broad or general "guide me" questions don't work well here.

However, if you have a specific, focused question, you will get more help than you could ever hope for.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
duhit Choudhary
Ranch Hand

Joined: Apr 01, 2012
Posts: 64
i am sorry about my way of asking question. but i just want the solution about how can i be able to compare those two different trackId, rest all thing i am able to do.
thanks by the way.. from the next time i keep that thing in mind.
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

duhit Choudhary wrote:how can i be able to compare those two different trackId

well, cant you take trackIds from the hashmap (using keySet()) and compare with the trackIds in list through nested for loops?
 
GeeCON Prague 2014
 
subject: update db