LoadFromFile ZOES + PostGreSQL + field Bytea
Posted: 12.05.2009, 15:48
Hi All,
I'm trying to upload a file to a field of type byte to PostGeSQL and I received the error below when I post a query
I'm using the code below
Stream := TMemoryStream.Create();
Stream.LoadFromFile(DAbre.FileName);
ZImagem.edit;
TBlobField(ZImagem.FieldByName('programa')).LoadFromStream(Stream);
ZImagem.post;
Stream.Free;
Thanks
Edmilson
I'm trying to upload a file to a field of type byte to PostGeSQL and I received the error below when I post a query
I'm using the code below
Stream := TMemoryStream.Create();
Stream.LoadFromFile(DAbre.FileName);
ZImagem.edit;
TBlobField(ZImagem.FieldByName('programa')).LoadFromStream(Stream);
ZImagem.post;
Stream.Free;
Thanks
Edmilson