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

Call a proc after a smartgwt INSERT

$
0
0
Dear Support,

I've got some difficulties to implement the following:
- An ADD request is issued from the client
- The Add is catched in a custom datasource, performed, and if successful we would like to call a stored procedure to do some additional work.

Code:

@Override
        public DSResponse executeAdd(DSRequest req) throws Exception {
                DSResponse response = super.executeAdd(req);
               
                if (response.getStatus() == DSResponse.STATUS_SUCCESS) {
                       
                        DSRequest request = new DSRequest(DSOperator.DS_NAME, "fetch", req.getRPCManager());
                        request.setOperationId("checkSystem");
                        request.setJoinTransaction(true);
                        DSResponse resp = request.execute();
                }
                return response;
        }

Here is the operation binding:

Code:

<operationBinding operationType="fetch" operationId="checkSystem">
                <customSQL>{call SP_SYSTEM_CHECK}</customSQL>
            </operationBinding>

The problem is that JDBC keeps telling me that the call did not return any rowset... I'm a bit surprised as the last line of my proc is a SELECT statement, and when I execute the proc in my SQL environement, it correctly shows me the returned data.

Code:

CREATE PROCEDURE SP_SYSTEM_CHECK
AS
BEGIN

        -- [...] proc code [...]
       
        SELECT 0 as ErrorCode
END
GO

Can you please advise me about what I have to change in order to achieve this ?

Many thanks,
Thomas

PS: We are using SmartGWT Power 4.0p

Viewing all articles
Browse latest Browse all 4756

Trending Articles