File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -3761,19 +3761,21 @@ procedure TMySQLConnection.Query(SQL: String; DoStoreResult: Boolean=False; LogC
37613761procedure TSqlSrvConnection.Query (SQL: String; DoStoreResult: Boolean=False; LogCategory: TDBLogCategory=lcSQL);
37623762var
37633763 TimerStart: QWord;
3764- VarRowsAffected: OleVariant;
3765- QueryResult, NextResult: TSQLQuery;
3766- Affected: Int64;
3764+ QueryResult: TSQLQuery;
37673765begin
37683766 inherited ;
37693767
37703768 TimerStart := GetTickCount64;
37713769 FLastRawResults.Clear;
37723770 try
3773- QueryResult := TSQLQuery.Create(FHandle); // FAdoHandle.ConnectionObject.Execute(SQL, VarRowsAffected, 1);
3771+ QueryResult := TSQLQuery.Create(FHandle);
37743772 FLastRawResults.Add(QueryResult);
37753773 QueryResult.DataBase := FHandle;
3774+ QueryResult.Transaction := FTransaction;
37763775 QueryResult.SQL.Text := SQL;
3776+ QueryResult.Options := [sqoAutoApplyUpdates, sqoAutoCommit, sqoCancelUpdatesOnRefresh];
3777+ QueryResult.PacketRecords := 10000 ;
3778+ QueryResult.ExecSQL;
37773779 Inc(FRowsAffected, QueryResult.RowsAffected);
37783780 FLastQueryDuration := GetTickCount64 - TimerStart;
37793781 FLastQueryNetworkDuration := 0 ;
You can’t perform that action at this time.
0 commit comments