Trace: • Custom IFactory Implementation • Addressing the Server via JNDI • Functions and Procedures With IN and OUT Parameters • Using AbstractMemStorage
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| jvx:server:db:func_proc [2018/02/02 11:18] admin | jvx:server:db:func_proc [2020/06/29 13:06] (current) cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~NOTRANS~~ | ~~NOTRANS~~ | ||
| - | ~~Title: Functions and Procedures with IN and OUT parameters~~ | + | ~~Title: Functions and Procedures With IN and OUT Parameters~~ | 
| - | If you use database procedures and/or functions in your application, wouldn't it be great to call them with one simple call. Normally a function or procedure call is very complex, because you have to define a CallableStatement, set the output parameters, execute the statement and read the result. And don't forget that the parameter index starts with 1 instead of 0! | + | If you use database procedures and/or functions in your application, wouldn't it be great to call them with one simple call? Normally, a function or procedure call is very complex because you have to define a CallableStatement, set the output parameters, execute the statement, and read the result. And don't forget that the parameter index starts with 1 instead of 0! | 
| - | Suppose we have a function (e.g. Oracle): | + | Suppose we have a function (e.g., Oracle): | 
| <file plsql> | <file plsql> | ||
| Line 20: | Line 20: | ||
| </file> | </file> | ||
| - | The function is simple, but uses one in/out and one out parameter. A standard JDBC call looks like: | + | The function is simple but uses one in/out and one out parameter. A standard JDBC call looks like: | 
| <file java> | <file java> | ||
| Line 68: | Line 68: | ||
| </file> | </file> | ||
| - | The ''executeFunction'' method supports standard Java Objects and our special Param objects, as used in the previous example. | + | The ''executeFunction'' method supports standard Java objects and our special Param objects, as used in the previous example. | 
| If you want to call a database procedure instead of a function, use the same classes and call ''executeProcedure''. | If you want to call a database procedure instead of a function, use the same classes and call ''executeProcedure''. | ||
