TUniQuery, ExecSQL vs Open/Close

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DerCarstenUK
Posts: 2
Joined: Mon 21 Jul 2014 12:10

TUniQuery, ExecSQL vs Open/Close

Post by DerCarstenUK » Mon 21 Jul 2014 12:25

Hi,

I've just started with UniDAC (test version so far). From what I've seen, a nice product!!

I've got a few 'newbee' questions:

1) What is the difference between the
a) ExecSQL
b) Execute
c) Open/Close
procedures?

2) Instead of dropping components on the form, I prefer to create them myself. I found out, that I cannot free or destroy the TUniQuery object without causing an exception. It works, when I create it with a TUniComponent object as its owner. The TUniQuery object will then be free'ed when the TUniConnection object is free'ed. Is this as intended?

Maybe the answers are obvious, but I couldn't find anything in the docs, which might have answered the above.

Regards

Carsten

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniQuery, ExecSQL vs Open/Close

Post by AlexP » Mon 21 Jul 2014 13:12

Hello,

There is no difference between ExecSQL and Execute methods, they are added to simplify migration from other components. The Open method will work only when a SQL statement (or a function/procedure) returns RecordSet (Cursor), otherwise, the Open method will return an error.
A similar issue occurred when developing mobile applications and is now fixed. The fix will be included in the next UniDAC version.

DerCarstenUK
Posts: 2
Joined: Mon 21 Jul 2014 12:10

Re: TUniQuery, ExecSQL vs Open/Close

Post by DerCarstenUK » Mon 21 Jul 2014 13:43

Hi Alex,

thanks for the swift response!

Re 2), I forgot to mention, that this occurred on IOS, not on Win32.

All understood. Thanks!

Regards

Carsten

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniQuery, ExecSQL vs Open/Close

Post by AlexP » Tue 22 Jul 2014 07:33

Yes, this problem is already fixed for mobile platforms, we'll try to release a new build with this fix by the end of the month.

Post Reply