Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Calling Oracle Stored Procedure or Function from SmartGWT 5.0p

$
0
0
Hi Isomorphic,

what is the best practice to have Oracle do some task and return a number as result?

Oracle Stored Procedure or Function?
Could you give an example? Here you seem to suggest function but with no example.
In the Quick Start Guide and the CustomQuerying-docs you suggest procedure.

I'd think that function is correct, but can't get it to work (from the logs I can see that the velocity expression is working).

.ds.xml:
Code:

                <operationBinding operationType="remove" operationId="removeABC" serverMethod="removeABC" requiresRole="deleteABCOwn, deleteABCSameLE">
                        <customSQL>deleteABC($values.ABC_ID)</customSQL>
                </operationBinding>

I'm using v10.0p_2015-08-16/PowerEdition Deployment.

I tried "deleteABC($values.ABC_ID)", "CALL deleteABC($values.ABC_ID)" and "EXEC deleteABC($values.ABC_ID)",

leading to different error messages, including:
  • ORA-06576: not a valid function or procedure name
  • ORA-00900: invalid SQL statement
  • Ungültiger SQL-Typ: sqlKind = UNINITIALIZED

My function is:
Code:

CREATE OR REPLACE FUNCTION deleteABC(abcId IN NUMBER) return NUMBER AS
BEGIN
--dummy
return 1000;
END;
/

Do you describe calling functions (returning different types) and stored procedures (with one or more OUT parameters) somewhere in detail?

This usecase should be very common, so most likely I just didn't find the docs for it, yet. On the other hand, there are not too many threads in the forums search.

Best regards
Blama

Viewing all articles
Browse latest Browse all 4756

Trending Articles