Is there a way to call a stored proc from xPages with parameters ?
I am using #JDBCExecuteQuery("oracle",sql,params)
How am I suppose to call the stored procedure ?
What would you put in your SQL line ?
AFAIK you cannot use a stored procedure with the #JDBC functions. Instead you can create a Java class/managed bean to call a stored procedure via JDBC. I have an example here how to use JDBC with the Extlib RDBMS features here: https://github.com/zeromancer1972/XPages-JDBC/blob/master/Code/Java/org/openntf/jdbc/DataConnector.java
The rules to issue a stored procedure are documented here: https://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html
Related
I am new to IIB, trying to call SQL server stored procedure using ESQL. Could anyone share working example to call stored procedure which returns single value.
There are 2 ways you can call a stored procedure in ESQL:
Define a procedure with the external keyword
https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac17040_.htm
Or use the PASSTHRU statement and call the stored procedure by putting the SQL command to call it into the parameter of the statement
https://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ak05100_.htm?lang=en
I have a stored procedure defined in oracle whose parameters are objects defined in oracle.
I need to invoke it through perl. I have looked but couldnt find any reference about it.
Could anyone help me out for the same ?
Thanks,
Why don't you write another Oracle procedure in which you can use your oracle-objects and call your target procedure? You could then call this new procedure by perl with standard parameters.
Bad architecture but should work...
(Sorry can't just comment)
Stored Procedure is used to insert rows into Oracle Table. Using Spring DAO, in Data Access Layer. How to do batch insert using Stored Procedure call... Flexiable enough to change SP, if need...
There are a number of ways to do that:
You can change your stored procedure to have array params, then inside your stored procedure you iterate over the arrays and execute the inserts
You batch it on the Java side, and send them all in once. There are 3 ways to do that
Spring : BatchSQLUpdate
Spring : JDBCTemplate.batchUpdate
Java : PreparedStatement.addBatch
These are all to call an SQL statement in a batch, but you can call a stored procedure as well as an sql with the following syntax
:
?=call procedurename(?, ?, ?)
is it possible to execute a stored procedure inside a user defined function in Oracle 10g database?
If yes, could you please give en example?
Thanks.
Sure you can. See for example The last example in Oracle® Database SQL Reference
10g Release 1 (10.1) Create function
The example uses a package but can also be a stored procedure. No problems.
What is your problem?
I had to change the SQL stored procedure to ORacle stored procddure.I am able to successfully execute my modified stored procedure in oracle.
But unable to obtain the query result in CF for the Oracle stored-Procedure.I have used <cfquery>.
Any suggestions or tips to for using an Oracle stored proc/CF-8?
Think you need cfstoredproc, not cfquery.
See manual page for more details.
It does really depend on how it reacts, i'd test your stored proc in oracle sql+plus first, to make sure it returns data, then try it via cfquery or stored procedure...