Convert FieldValue to Stream and Stream to FieldValue

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

Convert FieldValue to Stream and Stream to FieldValue

Post by sinys » Thu 16 Aug 2012 05:49

How I can convert FieldValue to Stream and Stream to FieldValue?
Like this:
Fields.SaveToStream
Fields.LoadFromStream
for any Field type (string, numbers, date, blob, xml), not only for blob.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Convert FieldValue to Stream and Stream to FieldValue

Post by AlexP » Tue 21 Aug 2012 10:30

Hello,

You can use the GetData(Buffer: Pointer) method of the TField for retrieving data and subsequent recording them to Stream with the help of the Write(Buffer: Pointer; Count: Longint) method, processing every field depending on its type

Post Reply