浏览代码

* Fix for streaming TSQLQuery.SQL and TSQLTransaction.Params

git-svn-id: trunk@13089 -
joost 16 年之前
父节点
当前提交
8babc4920c
共有 1 个文件被更改,包括 14 次插入2 次删除
  1. 14 2
      packages/fcl-db/src/sqldb/sqldb.pp

+ 14 - 2
packages/fcl-db/src/sqldb/sqldb.pp

@@ -164,6 +164,7 @@ type
     FTrans               : TSQLHandle;
     FAction              : TCommitRollbackAction;
     FParams              : TStringList;
+    procedure SetParams(const AValue: TStringList);
   protected
     function GetHandle : Pointer; virtual;
     Procedure SetDatabase (Value : TDatabase); override;
@@ -180,7 +181,7 @@ type
   published
     property Action : TCommitRollbackAction read FAction write FAction;
     property Database;
-    property Params : TStringList read FParams write FParams;
+    property Params : TStringList read FParams write SetParams;
   end;
 
 { TCustomSQLQuery }
@@ -227,6 +228,7 @@ type
     procedure SetInsertSQL(const AValue: TStringlist);
     procedure SetReadOnly(AValue : Boolean);
     procedure SetParseSQL(AValue : Boolean);
+    procedure SetSQL(const AValue: TStringlist);
     procedure SetUpdateSQL(const AValue: TStringlist);
     procedure SetUsePrimaryKeyAsKey(AValue : Boolean);
     procedure SetUpdateMode(AValue : TUpdateMode);
@@ -302,7 +304,7 @@ type
     property SchemaType : TSchemaType read FSchemaType default stNoSchema;
     property Transaction;
     property ReadOnly : Boolean read FReadOnly write SetReadOnly;
-    property SQL : TStringlist read FSQL write FSQL;
+    property SQL : TStringlist read FSQL write SetSQL;
     property UpdateSQL : TStringlist read FUpdateSQL write SetUpdateSQL;
     property InsertSQL : TStringlist read FInsertSQL write SetInsertSQL;
     property DeleteSQL : TStringlist read FDeleteSQL write SetDeleteSQL;
@@ -696,6 +698,11 @@ begin
   rollback;
 end;
 
+procedure TSQLTransaction.SetParams(const AValue: TStringList);
+begin
+  FParams.Assign(AValue);
+end;
+
 function TSQLTransaction.GetHandle: pointer;
 begin
   Result := TSQLConnection(Database).GetTransactionHandle(FTrans);
@@ -1340,6 +1347,11 @@ begin
     FParseSQL := True;
 end;
 
+procedure TCustomSQLQuery.SetSQL(const AValue: TStringlist);
+begin
+  FSQL.Assign(AValue);
+end;
+
 procedure TCustomSQLQuery.SetUpdateSQL(const AValue: TStringlist);
 begin
   FUpdateSQL.Assign(AValue);