• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me on this insert statement and pass it to the servlet

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I am performing a insert query on to the database in the DAO implemented Layer based on the AJAX request.

i need to inform to the JSP page about the status of the insert result to the jsp page.

int executeUpdate(String sql) , i am thinking in this way , if this returns 1 then its success or its failed operation . Is this correct?




 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the java.sql.Statement JavaDocs:

Returns:
either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic