Unified SQL and uniConnection.ExecSQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Unified SQL and uniConnection.ExecSQL

Post by FredS » Thu 12 Feb 2015 21:34

Is Unified SQL supposed to work for ExecSQL?

Because this errors out:
'{if Interbase} set generator NEXTSHAREFOLDERSID to 39 {else} Update Generators SET NEXTSHAREFOLDERSID = 39 {endif}'#$D#$A

with
---------------------------
Debugger Exception Notification
---------------------------
Project PA.exe raised exception class EIBCError with message 'Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 1
{if'.

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

Re: Unified SQL and uniConnection.ExecSQL

Post by ViktorV » Fri 13 Feb 2015 09:54

Unified SQL worked for ExecSQL.
To solve the problem, try to execute the following code before calling TUniConnection.ExecSQL:

Code: Select all

  if not EnableUniSQL then EnableUniSQL := True;

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Unified SQL and uniConnection.ExecSQL

Post by FredS » Fri 13 Feb 2015 18:18

I still get the same error even if I place that code right in front of the call:
if not EnableUniSQL then EnableUniSQL := True;
v := uniConnection.ExecSQL(ASql);
TUniSQL.Execute works of course with or without that code..

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Unified SQL and uniConnection.ExecSQL

Post by FredS » Sun 15 Feb 2015 20:22

One more thing, is TUniScript supposed to work with Unified SQL?

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

Re: Unified SQL and uniConnection.ExecSQL

Post by ViktorV » Mon 16 Feb 2015 10:41

Please make sure you have not set the EnableUniSQL global variable to False anywhere. If it is True, please send a small sample to demonstrate the issue to viktorv*devart*com, including a script to create and fill in the test database object.
TUniScript supports Unified SQL.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Unified SQL and uniConnection.ExecSQL

Post by FredS » Mon 16 Feb 2015 19:15

Hi Viktor,

The Demo has been sent, turns out to reproduce in a simple demo a call to ExecProc needed to be made first.

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

Re: Unified SQL and uniConnection.ExecSQL

Post by ViktorV » Tue 17 Feb 2015 07:37

Thank you for the information. We are investigating this behavior of UniDAC, and we will inform you about the results.

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

Re: Unified SQL and uniConnection.ExecSQL

Post by ViktorV » Thu 16 Apr 2015 12:16

We have already fixed this issue, the fix will be included in the next UniDAC build. If you want to get this fix before the next UniDAC version is released, please provide your license number and IDE version to viktorv*devart*com and we will send you a night build.

Post Reply