Page 1 of 1

procedure with return values not commit using uniquery FIREBIRD

Posted: Mon 30 Jan 2017 13:45
by gss200610
As I already posted in version 6.3 and said that it was fixed in 6.4.16, when using query with stored procedure return, does not write to the database, only shows in the application using FIREBIRD. With uni stored procedure works, with only query that does not.
I am attaching the database and the fonts so that it can be corrected in future versions of unidac, because today I have to use COMMIT RETAINING.

Follows link below the project as well as database used in the tests

https://mega.nz/#!w8hQxIqQ!wphjoa0bSi5x ... ZxDCkY4a0k

Re: procedure with return values not commit using uniquery FIREBIRD

Posted: Tue 31 Jan 2017 10:25
by ViktorV
This UniDAC behavior is correct. As we have already answered in the topic: viewtopic.php?f=28&t=33710
- the AutoCommit property in UniDAC is not applicable to SELECT statements. To execute stored procedures, that return parameters, in UniDAC, you should use the EXECUTE PROCEDURE <procedure> expression instead of SELECT * FROM <procedure>. In such case, to retrieve the value of an OUT parameter, you should use the TUniQuery.ParamByName method instead of TUniQuery.FieldByName;
- set the the DescribeParams option to True to execute the TUniQuery.Execute method:

Code: Select all

UniQuery1.SpecificOptions.Values['DescribeParams'] := 'True';

Re: procedure with return values not commit using uniquery FIREBIRD

Posted: Tue 31 Jan 2017 18:27
by gss200610
So, in this case I can use TUNISTOREDPROC instead of UNIQUERY, since it tests without separating parameters and commits, is it reliable?

Re: procedure with return values not commit using uniquery FIREBIRD

Posted: Wed 01 Feb 2017 13:25
by ViktorV
Yes, you can use TUniStoredProc without any changes to solve the issue. Also, you can use TUniQuery, but by making changes we specified above.