• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Stored Procedure Call Failed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic