File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Regarding JDBC concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Regarding JDBC concept" Watch "Regarding JDBC concept" New topic

Regarding JDBC concept

Xavy prakash

Joined: Sep 02, 2009
Posts: 3
hai friends....

Actualy am doing intranet application in jsp, that attendance page,login,logout time is calculated on click....the database has the following colums staff_id,staff_name,date,staff_login,staff_logout,etc....the case is...

morning if a person login,their id,name,login time has to be taken to database...

similarly if a person logout their id,name,login,logout time has to be entered....but id,name,login time will be already enterd in a row....during logout time insert query cant be used as it get inserted in second retrieval will be a problem.......

session concept is not used...........

get me a proper suggestion......regarding querry
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
I am having a hard time understanding your request. It sounds like you are saying that duplicate recoreds were inswerted, and you are having a hard time retrieving any. Is that what is happening or can you elaborate more on the issue.

So much trouble in the world -- Bob Marley
Ananth Chellathurai
Ranch Hand

Joined: Nov 21, 2007
Posts: 349

I am not able understand either.

Ananth Chellathurai [Walk on software]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46349
Do you mean how would you append logout time to a previous login? Try selecting login times for the current user, the finding the largest of those login times? You would have to read about update.

You might find setting a cookie or session number on the user's computer makes it easier to find the session.

Please be specific in your thread titles, and welcome to JavaRanch
I agree. Here's the link:
subject: Regarding JDBC concept
It's not a secret anymore!