18-04-2018, 03:55 PM
كما قال الاخ
PHP كود :
var
i : integer;
Begin
DM1.Source.close;
DM1.Source.open;
DM1.Source.first;
While Not DM1.Source.eof Do
Begin
With DM1.destination Do
Begin
Active:=False;
SQL.Clear;
SQL.Add('Insert into customer (N°, FIRSTNAME,LASTNAME,CITY,COUNTRY,date_enr)');
SQL.Add('Values (:b1 , :b2 , :b3 , :b4 , :b5, :b6)');
For i:= 0 to 6 do
if not DM1.source.Fields[i].isnull then
Begin
Params[i].DataType := DM1.source.Fields[i].DataType;
Params[i].Value := DM1.source.Fields[i].Value;
End;
Prepare;
ExecSQL;
End;
DM1.source.next;
End;

