Link to home
Start Free TrialLog in
Avatar of rdong
rdong

asked on

Problem calling a stored procedure updating database

I am new to calling stored procedure using jdbc. If you know both Java JDBC and stored procedure,  please help.

The following  is the code in a JSP program I use to call a stored procedure  which resides in MS SQL 2000

.............
CallableStatement cs = con.prepareCall("{call sp_update_eft_thresholds '750000000926140US','Test User100','100.00','10','200.00','2','300.00','3','400.00','4'}");

rs = cs.executeUpdate()
..................................

I also tried  :

.................
sp="sp_update_eft_thresholds '750000000926140US','Test User100','100.00','10','200.00','2','300.00','3','400.00','4'";

rs = stm.executeUpdate(sp);
...............................

This is the error I got:

C:\Tomcat5.0\work\Catalina\localhost\acm\org\apache\jsp\EditThreshold_jsp.java:652: incompatible types
found   : int
required: java.sql.ResultSet
                         rs = cs.executeUpdate();         
                                                      ^
1 error



      net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:207)
      com.actimize.infrastructure.authentication.ACMSecurityEnforcementFilter.doFilter(ACMSecurityEnforcementFilter.java:67)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:105)
      net.sf.acegisecurity.ui.AbstractIntegrationFilter.doFilter(AbstractIntegrationFilter.java:170)
      net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:368)
      net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:105)


How do I make the type compatible?  

This is urgent, please help!!!

ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rdong
rdong

ASKER

Thanks ojbects. I missed that...