Delphi Update records Insert if needed from Adotable 2 to AdoTable 1

Filter AdoQuery_1 Record
SQL.Add('SELECT * from    Med');
                  SQL.Add('Where Cliente Like ''%'+Edit1.text );
and

update AdoQuery_1 from AdoQuery_2  (master)
 Update record´s of Table1 from Table2 (chield)
    Update record´s of Table3 from Table4 (chield)

      

is there a faster way to update the selected record and do the same for the records of the child tables?

+2


a source to share


1 answer


  • The best - simpler and faster - would do it in SQL. Depending on your DBMS, you can create a stored procedure by following all three steps.
  • I'm not sure, but in AdoQuery_1, are you using LIKE to select a single client or multiple clients? If there are not many, then (1) the approach will really speed up updates.


0


a source







All Articles