Problem with upload file into PostgresDb
Posted: 12.10.2009, 09:06
For upload a file into db i use this code
for a small file under 150 mb this right but for larger file i receive this error : EOutOfMemory with message 'out of memory'....
I also tried with loadfromstream and receive the same error....
I use Postgres 8.2.14 and zeos 5.5.0...
Thanks
Code: Select all
ot := TOpenDialog.Create(self);
qry := TZQuery.Create(self);
qry.Connection := db1;
ot.Execute;
qry.SQL.Add('insert into tbfile (filename,content) values (:filename,:content)');
qry.ParamByName('filename').AsString := ExtractFileName(ot.FileName);
qry.ParamByName('content').LoadFromFile(ot.FileName,ftBlob);
qry.Open;
I also tried with loadfromstream and receive the same error....
I use Postgres 8.2.14 and zeos 5.5.0...
Thanks