Ver Mensaje Individual
  #5  
Antiguo 22-06-2014
georgeliners georgeliners is offline
Miembro
NULL
 
Registrado: jun 2014
Posts: 10
Reputación: 0
georgeliners Va por buen camino
Smile

Gracias Casimiro, haciendo algunas pruebas ya voy entendiendo y me esta resultando. Lei los pdfs que me mandaste y encontre el camino en este parrafo:

Código:
Multiple statements in TZQuery and TZUpdateSQL
The components TZQuery and TZUpdateSql provide the possibility to execute multiple statements, internally.
So it is possible to place multiple SQL statements (even with parameters) for execution in SQL property.
They only have to be separated by semicolon. Here an example:
:
With Query do Begin
Sql.Clear;
Sql.Add('DELETE FROM table1;');
Sql.Add('INSERT INTO table1 VALUES (:Val1, :Val2);');
Sql.Add('INSERT INTO table2 VALUES (:Val3, :Val2);');
Sql.Add('UPDATE table3 SET field1 = :Val4;');
Params.ParamByName('Val1').AsInteger := 123;
:
ExecSql;
End;
:
The statements will be executed in given order. It is also possible to execute multiple statements if they are
grouped in this manner inside multiple TZUpdateSqlObjects
in order to update multiple tables.
Lo que aunme tiene de cabeza un poco es el uso del componente Zupdatesql no estoy seguro si es neceserio del todo, pero mientras digiero bien la informacion espero se me aclare, bueno si alguien me puede dar una mano con respecto al ultimo componente seria mejor. Saludos
Responder Con Cita