Topic: How to load Blob In Database to Image

I record jpg,png,bmp in database type blob
how to read and show at image1 in form ???
help me please!

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How to load Blob In Database to Image

procedure Form1_GridEmployees_OnCellClick (Sender: string; ACol, ARow: Integer);
begin
     Form1.DBImage1.Clear;
     Form1.DBImage1.LoadFromDatabase('employees', 'photo', Form1.GridEmployees.dbItemID);
end;

begin
end.


Project with example
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.

3 (edited by prahousefamily 2017-01-11 13:34:59)

Re: How to load Blob In Database to Image

hi Dmitry.
if table not have column  "id" in table How change  Form1.GridEmployees.dbItemID to ???
IN MySQL i have table record picture but table not create by mvd  how to fix ??? problem

table name : pic_table
column primary : employee
column type : varchar

column picture : pic_employee
coloumn type : blob

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How to load Blob In Database to Image

There is no way to use method

 Form1.DBImage1.LoadFromDatabase

if you database table not have primary key called "id"

Dmitry.