SmartClient Version: v9.1p_2015-02-07/PowerEdition Deployment (built 2015-02-07)
I'm doing a custom 'update' operation on SQL Server. The SQL code contains many DML statements. Within the SQL I have a simple integer variable,
DECLARE @RC int = 0;
Depending on certain conditions I may set the @RC variable to something other than 0. I want to read this value and pass it back through the DSResponse.
I have tried unsuccessfully to get the variable to be reflected in :
affectedRows,
queueStatus,
status,
data
fields of the DSResponse but have failed.
Other than causing the SQL code to throw an exception I can't seem to get the integer status returned.
I have tried in the DML sequence using this:
SELECT @RC
also using the OUTPUT clause of an INSERT statement:
INSERT INTO Fake_Table ( RC )
OUTPUT INSERTED.RC
Values ( @RC)
and nothing works. Any suggestions?
Naturally if I run this DML sequence in a SQL query it works just fine returning the integer status.
I have to use the 'update' operation Type because of the DML statements, thus calling the underlying executeUpdate() JDBC method.
Somebody must have solved this problem before.
I'm doing a custom 'update' operation on SQL Server. The SQL code contains many DML statements. Within the SQL I have a simple integer variable,
DECLARE @RC int = 0;
Depending on certain conditions I may set the @RC variable to something other than 0. I want to read this value and pass it back through the DSResponse.
I have tried unsuccessfully to get the variable to be reflected in :
affectedRows,
queueStatus,
status,
data
fields of the DSResponse but have failed.
Other than causing the SQL code to throw an exception I can't seem to get the integer status returned.
I have tried in the DML sequence using this:
SELECT @RC
also using the OUTPUT clause of an INSERT statement:
INSERT INTO Fake_Table ( RC )
OUTPUT INSERTED.RC
Values ( @RC)
and nothing works. Any suggestions?
Naturally if I run this DML sequence in a SQL query it works just fine returning the integer status.
I have to use the 'update' operation Type because of the DML statements, thus calling the underlying executeUpdate() JDBC method.
Somebody must have solved this problem before.