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','20 0.00','2', '300.00',' 3','400.00 ','4'}");
rs = cs.executeUpdate()
.......................... ........
I also tried :
.................
sp="sp_update_eft_threshol ds '750000000926140US','Test User100','100.00','10','20 0.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\a pache\jsp\ EditThresh old_jsp.ja va:652: incompatible types
found : int
required: java.sql.ResultSet
rs = cs.executeUpdate();
^
1 error
net.sf.acegisecurity.inter cept.web.S ecurityEnf orcementFi lter.doFil ter(Securi tyEnforcem entFilter. java:207)
com.actimize.infrastructur e.authenti cation.ACM SecurityEn forcementF ilter.doFi lter(ACMSe curityEnfo rcementFil ter.java:6 7)
net.sf.acegisecurity.util. FilterToBe anProxy.do Filter(Fil terToBeanP roxy.java: 105)
net.sf.acegisecurity.ui.Ab stractInte grationFil ter.doFilt er(Abstrac tIntegrati onFilter.j ava:170)
net.sf.acegisecurity.ui.Ab stractProc essingFilt er.doFilte r(Abstract Processing Filter.jav a:368)
net.sf.acegisecurity.util. FilterToBe anProxy.do Filter(Fil terToBeanP roxy.java: 105)
How do I make the type compatible?
This is urgent, 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','20
rs = cs.executeUpdate()
..........................
I also tried :
.................
sp="sp_update_eft_threshol
rs = stm.executeUpdate(sp);
..........................
This is the error I got:
C:\Tomcat5.0\work\Catalina
found : int
required: java.sql.ResultSet
rs = cs.executeUpdate();
^
1 error
net.sf.acegisecurity.inter
com.actimize.infrastructur
net.sf.acegisecurity.util.
net.sf.acegisecurity.ui.Ab
net.sf.acegisecurity.ui.Ab
net.sf.acegisecurity.util.
How do I make the type compatible?
This is urgent, please help!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)
ASKER