How to insert/update pictures in Firebird
Posted: 20.10.2011, 20:08
Hi,
How can i insert pictures in database (Firebird 2.1.3) blob fields?
The field in my db are:
id_test(Bigint)
name_test(Varchar)
img_test(Blob, 80, Binary)
I can insert the picture but i want to do at once:(id_test is a autoincrement field) 'name_test' and the 'img_test'.
For the picture:
EDIT LATER:
I found the solution:
But now i have a problem to edit the pictures? how can i update the blob field?
My system: Lazarus 0.9.30, Zeoslib 6.6,Firebird 2.13
How can i insert pictures in database (Firebird 2.1.3) blob fields?
The field in my db are:
id_test(Bigint)
name_test(Varchar)
img_test(Blob, 80, Binary)
I can insert the picture but i want to do at once:(id_test is a autoincrement field) 'name_test' and the 'img_test'.
For the picture:
Code: Select all
with ZQuery1 do
begin
Insert;
TBlobField( fieldByName('img_test')).LoadFromFile('C:\pics.jpg');
Post;
end;
I found the solution:
Code: Select all
FieldByName('name_test').AsString:=Edit1.Text;
My system: Lazarus 0.9.30, Zeoslib 6.6,Firebird 2.13