Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkeyIOSOSXWindows

Read And Write A Blob Field Using FireDAC With Firemonkey On Android And IOS

Delphi XE5 Firemonkey FireDAC BlobsIf you’re using the FireDAC components that comes with Delphi XE5 Firemonkey and you want to save a bitmap or some other type of data to a blog field on your embedded database (either SQLite, IBlite, or Interbase To Go) it can be a bit tricky. For saving it is pretty standard fair with the TFDDataSet.LoadFromStream() which will load a stream like a memory stream into a field. The important piece to reading the blob back out is is the TFDDataSet.CreateBlobStream() function. I have included two functions below which show an example of how to read and write a string and bitmap data from an image using a FireDAC TFDQuery component. This method of reading and writing a blog works on Android and IOS as well as Windows and OSX.

Head over and check out the FireDAC demo from Embarcadero and then use the functions to read and write your blob data.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

Sign up for our Newsletter and
stay informed

8 Comments

Leave a Reply