Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

last generated slno

 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to get the last generated serial numberfrom my sql database.I tried the following my sql query directly in database.it is working.but when i use this in my servlet program,it is showing error.

error:

column usr_login_time not found


my database is correct and i am having the field usr_login_time in table time.when i use some other query like

I am able to print the time.I dont know why MAX(slno) is not working in my servlet code.

please help me to solve this.

Thanks.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You aren't selecting usr_login_time in your query.

I think this thread would sit better in the JDBC forum, so I shall move it there.

CR
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic