mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
* fcl-db: tsqlscript: do not parse : as parameters; fixes creating Firebird stored procedures with select bla into :bla
cosmetic: comments git-svn-id: trunk@26112 -
This commit is contained in:
parent
9981481729
commit
caa86aaab9
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Copyright (c) 2004 by Joost van der Sluis
|
Copyright (c) 2004-2013 by Joost van der Sluis, FPC contributors
|
||||||
|
|
||||||
SQL database & dataset
|
SQL database & dataset
|
||||||
|
|
||||||
@ -1763,7 +1763,7 @@ begin
|
|||||||
if Separator <> sepNone then
|
if Separator <> sepNone then
|
||||||
begin
|
begin
|
||||||
if ((Separator in [sepWhitespace,sepComment]) and (PhraseP = SavedP)) then
|
if ((Separator in [sepWhitespace,sepComment]) and (PhraseP = SavedP)) then
|
||||||
PhraseP := CurrentP; // skip comments(but not parentheses) and white spaces
|
PhraseP := CurrentP; // skip comments (but not parentheses) and white spaces
|
||||||
|
|
||||||
if (CurrentP-PhraseP > 0) or (Separator = sepEnd) then
|
if (CurrentP-PhraseP > 0) or (Separator = sepEnd) then
|
||||||
begin
|
begin
|
||||||
@ -1805,7 +1805,7 @@ begin
|
|||||||
ppTableName:
|
ppTableName:
|
||||||
begin
|
begin
|
||||||
// Meta-data requests are never updateable
|
// Meta-data requests are never updateable
|
||||||
// and select-statements from more then one table
|
// and select statements from more than one table
|
||||||
// and/or derived tables are also not updateable
|
// and/or derived tables are also not updateable
|
||||||
if (ASchema = stNoSchema) and
|
if (ASchema = stNoSchema) and
|
||||||
(Separator in [sepWhitespace, sepComment, sepDoubleQuote, sepEnd]) then
|
(Separator in [sepWhitespace, sepComment, sepDoubleQuote, sepEnd]) then
|
||||||
@ -2420,6 +2420,7 @@ constructor TSQLScript.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FQuery := TCustomSQLQuery.Create(nil);
|
FQuery := TCustomSQLQuery.Create(nil);
|
||||||
|
FQuery.ParamCheck := false; // Do not parse for parameters; breaks use of e.g. select bla into :bla in Firebird procedures
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TSQLScript.Destroy;
|
destructor TSQLScript.Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user