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