16-04-2018, 12:20 AM
السلام عليكم
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 5 do //You have 6 parameters that's why
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;


