Meaningless Drivel is fun!*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "update db" Watch "update db" New topic

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

Joined: Oct 02, 2003
Posts: 11170

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?
I agree. Here's the link:
subject: update db
Similar Threads
Model or bean class is not available to Action Class
inserting queries advance
inserting queries
Insert query from java program
How to use log across objects