update multiple records with different values in MySQL
Posted: Wed 26 Mar 2008 13:10
(delphi 2006)
I want to update multiple records (e.g. 10000 rows) , each of which has different values.
In the ODAC for Oracle it is possible like that:
{
OraSql : TOraSql;
OraSQL.sql.text := 'update Roads set E1 = :p1 where ID = :p2';
OraSQL.prepare;
OraSQL.Params.items[1].Itemasinteger[counter] := IntArray[0];
OraSQL.Params.items[0].ItemasFloat[counter] := DataArray[0];
inc(counter);
if counter > 10000 then OraSQL.exeute(10000);
}
Is there a component in MyDAC that I can have the same function?
I want to update multiple records (e.g. 10000 rows) , each of which has different values.
In the ODAC for Oracle it is possible like that:
{
OraSql : TOraSql;
OraSQL.sql.text := 'update Roads set E1 = :p1 where ID = :p2';
OraSQL.prepare;
OraSQL.Params.items[1].Itemasinteger[counter] := IntArray[0];
OraSQL.Params.items[0].ItemasFloat[counter] := DataArray[0];
inc(counter);
if counter > 10000 then OraSQL.exeute(10000);
}
Is there a component in MyDAC that I can have the same function?
Code: Select all