Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stored Procedure Call Failed

 
laxmikant shimpi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please tell me why this does not return true ?
I am using MS SQL Server 2000 Driver for JDBC and using MS SQL Server 2000.

Connection cnConnection = DatabaseUtil.openConnection();
CallableStatement stmt = cnConnection.prepareCall("{ Call SP_ASSIGN_TEST (?, ?)}");
stmt.setString(1,"Laxmikant");
stmt.registerOutParameter(2, 12);
boolean blnGood = stmt.execute();
System.out.println(blnGood);
DatabaseUtil.closeConnection(cnConnection);
------ returns false.
should return true.
Thanks in Advance
Laxmikant
[ September 06, 2002: Message edited by: laxmikant shimpi ]
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your stored procedure expected to return
anything? execute (of Statement) may return multiple results.It will return true if the next result is a ResultSet object and false if it is an update count or there are no more results.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic