18-04-2018, 11:27 PM
السلام عليكم جرب هذا
الكود غير مجرب لا امتلك المكونات و لا قاعدة البيانات
طبقت الفكرة التي قلتها سابقا
الكود غير مجرب لا امتلك المكونات و لا قاعدة البيانات
طبقت الفكرة التي قلتها سابقا
PHP كود :
var
i: Integer;
begin
Source.close;
Source.open;
Source.first;
while not Source.eof do
begin
destination.SQL.Clear;
destination.SQL.Add('Insert into customer (N°, FIRSTNAME,LASTNAME,CITY,COUNTRY,date_enr)');
destination.SQL.Add('Values (:b1 , :b2 , :b3 , :b4 , :b5, :b6)');
for i:= 0 to Source.FieldCount-1 do
begin
destination.Params[i].DataType := source.Fields[i].DataType;
if not source.Fields[i].IsNull then
destination.Params[i].Value := source.Fields[i].Value
else
if source.Fields[i] is TDateTimeField then
if not source.Fields[i].AsDateTime = 0 then
destination.Params[i].Value := source.Fields[i].Value
else
destination.Params[i].Value := source.Fields[i].Value;
destination.ExecSQL;
end;
source.next;
end;
end;
و لرب نازلة يضيق لها الفتى ذرعا و عند الله منها المخرج
ضاقت فلما استحكمت حلقاتها فرجت و كنت اضنها لا تفرج
ضاقت فلما استحكمت حلقاتها فرجت و كنت اضنها لا تفرج

