Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
var
FAdoHandle: TAdoConnection;
VarRowsAffected: OleVariant;
QueryResult: _RecordSet;
begin
SQL:='SELECT 1; SELECT 2; UPDATE xxx;';
QueryResult := FAdoHandle.ConnectionObject.Execute(SQL, VarRowsAffected, 1);
while(QueryResult <> nil) do begin
// do something for the result of QueryResult
QueryResult := QueryResult.NextRecordset(VarRowsAffected); // get the next;
end;
end;Code: Select all
procedure TForm1.Button3Click(Sender: TObject);
begin
with FUniQuery do
begin
SpecificOptions.Values['MySQL.FetchAll'] := 'false';
SQL.Clear;
SQL.Add('SELECT 1; SELECT 2; UPDATE xxx; ');
Open;
repeat
// how to get each recordset?
until not OpenNext; // OpenNext work for "update"?
end;
end;Questions:
1. How to save each result of RecordSet for these three instructions in unidac?
2. OpenNext work for the "update" instruction? Because there is none of "ExecuteNext"
3. by defaut Uniquery determine the diff sql by ";" automatically? If I use "delimiter ||" in my instructions, how unidac deal with it?
Thanks in advance.