| Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML | ||||
|
||||
|
|
||||
| Tutorial Categories: Ajax
| Articles
| JSP
| Bioinformatics
| Database
| Free
Books |
Hibernate
| J2EE
| J2ME
| Java
| JavaScript
| JDBC
| JMS
| Linux
| MS
Technology |
PHP
| RMI
| Web-Services
| Servlets
| Struts
| UML
|
|
||||||||||||||||||||||||||||||
|
Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs |
||||||||||||||||||||||||||||||
Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.
Copyright © 2007. All rights reserved.
Current Comments
1 comments so far (post your own) View All Comments Latest 10 Comments:results.get(0), give it to me a Null?
public int siguienteIdDeclarante(){
int result = 0;
Session session = null;
try {
session = factory.openSession();
String SQL_QUERY = "select max(declarantesId) from Declarantes declarantes";
Query query = session.createQuery(SQL_QUERY);
List results = query.list();
System.out.println("Maximo " + results.get(0));
}catch(Exception e) {
result= -1;
System.out.println(e.toString());
}finally {
if (session != null) {
try {
session.close();
}
catch (HibernateException e) {
}
}
return result;
}
}
Thank you
Posted by Jorge on Tuesday, 12.8.09 @ 05:32am | #93159