I have this code all looks good also i dont received any message error but dont insert nothing on my table, SQLQTT "formaqc"table is temporal has 3 records but i need pass to SQLQCF "detaqcrep" , what I doing wron pls help me.
Var STream:TStream;
begin
// SQLQCF.UpdateMode := upWhereAll;
SQLQTT.First;
while not SQLQTT.EOF do begin
if(SQLQTT.FieldByName('NewRec').AsBoolean = True) then begin
with SQLQTT do begin
Stream:=CreateBlobStream(SQLQTT.FieldByName('mesurements'),bmRead);
with SQLQCF do begin
Insert;
FieldByname('NumPart').AsString := FormCtrlPart.SQLQPartes.FieldByName('NumPart').AsString;
FieldByname('ViewGpo').AsString := SQLQTT.FieldByName('ViewGpo').AsString;
FieldByname('ViewDesc').AsString := SQLQTT.FieldByName('ViewDesc').AsString;
FieldByname('FoliosGpo').AsInteger := SQLQTT.FieldByName('FoliosGpo').AsInteger;
FieldByname('ProcCode').AsString :='0';
if( Stream <> nil) then
TBlobField(SQLQCF.FieldByName('mesurements')).LoadFromStream(Stream);
Post;
Stream.Free;
end;
SQLQCF.ApplyUpdates;
end;
end;
SQLQTT.Next;
end;
// FormPrinc.SQLTMSC.CommitRetaining;
FormPrinc.SQLTMSC.Commit;
SQLQTT.Close;
SQLQCF.Close;
FormQC.Close;
FormCtrlPart.DBGrid1.Refresh;
thanks for all.