mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 06:09:18 +02:00
* Patch from Ondrej Pokorny to allow customizing the kind of query being created (bug ID 0033863)
git-svn-id: trunk@39238 -
This commit is contained in:
parent
e8f74fdbdb
commit
373061043b
@ -694,6 +694,7 @@ type
|
|||||||
Procedure SetDatabase (Value : TDatabase); virtual;
|
Procedure SetDatabase (Value : TDatabase); virtual;
|
||||||
Procedure SetTransaction(Value : TDBTransaction); virtual;
|
Procedure SetTransaction(Value : TDBTransaction); virtual;
|
||||||
Procedure CheckDatabase;
|
Procedure CheckDatabase;
|
||||||
|
function CreateQuery: TCustomSQLQuery; virtual;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner : TComponent); override;
|
constructor Create(AOwner : TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -3319,11 +3320,16 @@ begin
|
|||||||
DatabaseError(SErrNoDatabaseAvailable,Self)
|
DatabaseError(SErrNoDatabaseAvailable,Self)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSQLScript.CreateQuery: TCustomSQLQuery;
|
||||||
|
begin
|
||||||
|
Result := TCustomSQLQuery.Create(nil);
|
||||||
|
Result.ParamCheck := false; // Do not parse for parameters; breaks use of e.g. select bla into :bla in Firebird procedures
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TSQLScript.Create(AOwner: TComponent);
|
constructor TSQLScript.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FQuery := TCustomSQLQuery.Create(nil);
|
FQuery := CreateQuery;
|
||||||
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