barnarp
asked on
TBlobField SaveToFile
The following open question in Delphi refers: https://www.experts-exchange.com/questions/21109485/Oracle-BLOB-field-SaveToFile-unsuccessful.html
I am really desperate at this stage. My problem is that the following code, does not download the files correctly. They are corrupted (so it seems) with retrieval from the database.
Both questions points to accepted answer.
with dm.qBLOB do //tquery
begin
Close;
SQL.Clear;
SQL.Add('SELECT CPLANT_BLOB FROM DOCBLOB WHERE DOCUMENT = :DOC');
parambyname('DOC').AsStrin g := curdocid.Text; //editbox
Open;
try
TBlobField(dm.qBLOB.FieldB yName('CPL ANT_BLOB') ).SaveToFi le(dirname );
Close;
MessageDlg(curdoctitle.Tex t + ' successfully retrieved from the database.', mtInformation, [mbOK], 0 );
except
Close;
MessageDlg(curdoctitle.Tex t + ' could not be retrieved from the database.', mtError, [mbOK], 0 );
Exit;
end;
end;
end;
BDE BLOB setting:
DB.Params.add('BLOB SIZE=9000');
Any help please
Any help please
I am really desperate at this stage. My problem is that the following code, does not download the files correctly. They are corrupted (so it seems) with retrieval from the database.
Both questions points to accepted answer.
with dm.qBLOB do //tquery
begin
Close;
SQL.Clear;
SQL.Add('SELECT CPLANT_BLOB FROM DOCBLOB WHERE DOCUMENT = :DOC');
parambyname('DOC').AsStrin
Open;
try
TBlobField(dm.qBLOB.FieldB
Close;
MessageDlg(curdoctitle.Tex
except
Close;
MessageDlg(curdoctitle.Tex
Exit;
end;
end;
end;
BDE BLOB setting:
DB.Params.add('BLOB SIZE=9000');
Any help please
Any help please
ASKER
BDE version 5.01
I changed the code to DB.Params.add('BLOB SIZE=1000');
Still no change. I will now try to change the BLOB field to LONG RAW on the database and see if that makes a difference.
I changed the code to DB.Params.add('BLOB SIZE=1000');
Still no change. I will now try to change the BLOB field to LONG RAW on the database and see if that makes a difference.
in the BDE, on Drivers page, you was able to choose 2 Dll's. One of the was not working properly, but I don't remember which exactly.
Maybe you can View / Blob Explorer and try to view blob field from there. Maybe it will give you some more reasonable error....
Maybe you can View / Blob Explorer and try to view blob field from there. Maybe it will give you some more reasonable error....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
glad you solved it this way,
but it should also work with a blob-type, just courious
meikl ;-)
but it should also work with a blob-type, just courious
meikl ;-)
ASKER
Thanks for all the comments
ASKER
Yes thanks
9000 is a too high value -> max limit is 1000 (1MB),
this entry applys only for dead datasets (non live)
well usual it should work without any corruption,
maybe you need an update of the bde or the sqllinks
what bde-version do you use?