Download Picture From DataBase

Good Day
I Have a question, as I do to save multiple images at once on my PC from the database, I have images stored in blob fields, how download?

I make the following to save as image and brand me Error

Dim GIMA As RecordSet Dim ImagenCarp As FolderItem Dim Foto As Picture ImagenCarp = SpecialFolder.Windows.Child("/Temp/") GIMA = Android.SQLSelect("SELECT FotoEvidencia FROM evidenciaext WHERE NombreEvidencia='" + Trim(PopPlanta.Text) + "'") Foto=Picture.Open(ImagenCarp) Foto.Save(ImagenCarp.Child("/TempXojo/admin.jpg"), Picture.SaveAsJPEG)

Error: NilObjectException…





Foto = GIMA.Field(“FotoEvidencia”).PictureValue

As a sidenote: It is a bad idea to store images in a database.
Use a database for what it is meant for: Storing records and the relations between those records.
Use a filesystem for what it is meant for: Writing, reading, storing pieces of data.

thank you very much Tim, I had been past this great little detail …
I know that there are risks to almcenar files in a database, I do it because few images and these are temporary … Thanks.