Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Addressed for Version 1.07 » View Incident Report |
Serious |
Reported By: Roy Lambert Reported On: 12/30/2007 For: Version 1.07 Build 1 |
procedure ReturnTableToMemo(Fld: string; SrcTbl, DestTbl: TEDBTable); var ms: TMemoryStream; WasEditing: boolean; begin ms := TMemoryStream.Create; try WasEditing := (DestTbl.State in dsEditModes); if not WasEditing then GetRecordLock(DestTbl, 200); if SrcTbl.RecordCount > 0 then begin SrcTbl.SaveToStream(ms); TMemoField(DestTbl.FieldByName(Fld)).LoadFromStream(ms) end else DestTbl.FieldByName(Fld).Clear; if not WasEditing then DestTbl.Post; finally ms.Free; end; end; function StreamMemoToTable(Fld: string; SrcTbl: TEDBDataset; DestTbl: TEDBTable; OpenExclusive: boolean = False): boolean; var ms: TMemoryStream; begin try DestTbl.Close; DestTbl.Exclusive := True; ClearTableDestTbll); DestTbl.Close; DestTbl.Exclusive := OpenExclusive; DestTbl.Open; if not SrcTbl.FieldByName(Fld).IsNull then begin ms := TMemoryStream.Create; try TMemoField(SrcTbl.FieldByName(Fld)).SaveToStream(ms); DestTbl.LoadFromStream(ms); DestTbl.Refresh; DestTbl.First; finally ms.Free; end; end; Result := True; except Result := False; end; end;
This web page was last updated on Tuesday, April 23, 2024 at 08:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |