Does UniQuery.ExecSQL execute a script or only the first statement of the script ?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Does UniQuery.ExecSQL execute a script or only the first statement of the script ?

Post by swierzbicki » Mon 06 Jul 2015 16:20

Hello,

I'm executing this script but it looks like only the first statement is used :

Code: Select all

INSERT INTO colis_inventaires_details
 (Id_Inventaire, Gencod_Article, Code_Article, Utilisateur, Date_Inventaire, Code_Barre)
VALUES
 (:Id_Inventaire,  :Gencod_Article, :Code_Article, :Utilisateur, :Date_Inventaire, :Code_Barre);
INSERT INTO colis_inventaires_details_quantites
 (Id_Inventaire, Gencod_Article, Code_Article, Gencod_Piece, Quantite_Pieces)
SELECT :Id_Inventaire, Gencod_Article, Code_Article, Gencod_Piece, Nombre_Pieces
FROM articles_details where Gencod_Article = :Gencod_Article and Code_Article = :Code_Article;
This SQL is calling from TUniQuery.ExecSQL (I'm using a Tuniquery component because of the parameters)

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

Re: Does UniQuery.ExecSQL execute a script or only the first statement of the script ?

Post by AlexP » Tue 07 Jul 2015 09:03

Hello,

Currently, multiple SQL statements are supported either without parameters or each statement must have the same number of parameters and their names.
We will consider the possibility to support multiple parameters in the next versions.


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

Re: Does UniQuery.ExecSQL execute a script or only the first statement of the script ?

Post by AlexP » Mon 13 Jul 2015 07:19

You are welcome. Feel free to contact us if you have any further questions.

Post Reply