procedure with return values not commit using uniquery FIREBIRD

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gss200610
Posts: 35
Joined: Mon 23 May 2016 22:29

procedure with return values not commit using uniquery FIREBIRD

Post by gss200610 » Mon 30 Jan 2017 13:45

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: procedure with return values not commit using uniquery FIREBIRD

Post by ViktorV » Tue 31 Jan 2017 10:25

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';

gss200610
Posts: 35
Joined: Mon 23 May 2016 22:29

Re: procedure with return values not commit using uniquery FIREBIRD

Post by gss200610 » Tue 31 Jan 2017 18:27

So, in this case I can use TUNISTOREDPROC instead of UNIQUERY, since it tests without separating parameters and commits, is it reliable?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: procedure with return values not commit using uniquery FIREBIRD

Post by ViktorV » Wed 01 Feb 2017 13:25

Yes, you can use TUniStoredProc without any changes to solve the issue. Also, you can use TUniQuery, but by making changes we specified above.

Post Reply