sql - Spring MVC - Executing an Oracle Stored Procedure using java? -


i have jdbctemplate connection , namedparameterjdbctemplate connection variable between spring mvc application , oracle database. have stored procedure in oracle database takes either 0 or 1 input parameter, , not return upon completion.

i need understanding how execute stored procedure.

eventually need send execution thread complete without having user sit , wait, need step first.

i have looked @ other questions on site , feels explanations aren't giving me can work with. need advise can offered.

all have far isn't correct:

    public void processretrostoepay() throws sqlexception{         //callablestatement cs = spaejdbctemplate.preparecall("rp_retro_process(?)");         //cs.execute();     } 

as per java callablestatement api, should use syntax:

"{?= call <procedure-name>[(<arg1>,<arg2>, ...)]}" "{call <procedure-name>[(<arg1>,<arg2>, ...)]}" 

and per oraclecallablestatement api, can use either syntax above, or oracle-specific syntax:

"begin proc (?,?); end;" "begin ? := func(?,?); end;" 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

objective c - Ownership modifiers with manual reference counting -

python 3.x - Mapping specific letters onto a list of words -