Trace:
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
jvx:server:db:func_proc [2018/02/02 11:17] admin created |
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 48: | Line 48: | ||
| </file> | </file> | ||
| - | ou are right, we have not support for in/out and out parameters! To support this kind of parameters, we have some special classes: | + | You are right, we have not support for in/out and out parameters! To support this kind of parameters, we have some special classes: |
| com.sibvisions.rad.persist.jdbc.param.InParam \\ | com.sibvisions.rad.persist.jdbc.param.InParam \\ | ||
| 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''. |
