File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display one record per current date

 
usha mocherla
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I have a problem to slove. I have table with me fields id and description.

what i want to do is i have to display each record on current date.means

on change of system date i have to change the record discription.

so any ideas plz

thanks in advance
 
Mehul Sanghvi
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I guess defining a job on database would be an easier option.

If you want to do it thru a client java application, in that case you will need to write a Thread which will keep running and at 12 midnight make a DB connection and update the value in the table.

I hope this helps.

Regards,
Mehul K. Sanghvi.
 
usha mocherla
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Mehul Sanghvi ,

Thanks for the reply,
but sorry i could not communicate my problem clearly it seems

ex:suppose i have 40 records with me.

on change on sysdate i have to display a new record on my jsp page.

after completion of 40 records again it should start with 1st record

and display each one on change of sys date.
so any suggestions plz

regards

Usha
 
Mehul Sanghvi
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

Sorry for the misinterpretation of your question.

And just to clarify that I have got it right this time you want a functionality some what similar to displaying maybe a quote of the day on your jsp, right?

Well the way I would do it is, define a table in db(or a property file on web server) which will hold the id of the current description being displayed and the date when the id was set. And then while the jsp is displayed check for the set date to current date, if these are not same then query the db for description where id = currentId+1.

Regards.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic