Subject | INSERT BLOB |
---|---|
Author | Ronan van Riet |
Post date | 2004-01-06T19:48:22Z |
Hello,
I am using a TIBOStoredProc to INSERT a blob into a table (Firebird 1.5 R7).
An AV is thrown see code extract.
procedure TDataModule2.waADD_PROJECTExecute(Sender: TObject);
var
a1: string;
begin
with IBO_SP_ADD_PROJECT, pWebApp do begin
Close;
if not prepared then prepare;
a1 := 'c:\a.gif'
if FileExists(a1) then begin
TBlobField(Params.ParamByName('pGIF')).LoadFromFile(a1);
<------------- AV
// try
ExecProc;
// except ???
end;
end;
end;
This is probably due to the invalid typecase TBlobField. How can I solve
this problem?
Also what would the try except block typically look like?
Kind regards,
Ronan van Riet
I am using a TIBOStoredProc to INSERT a blob into a table (Firebird 1.5 R7).
An AV is thrown see code extract.
procedure TDataModule2.waADD_PROJECTExecute(Sender: TObject);
var
a1: string;
begin
with IBO_SP_ADD_PROJECT, pWebApp do begin
Close;
if not prepared then prepare;
a1 := 'c:\a.gif'
if FileExists(a1) then begin
TBlobField(Params.ParamByName('pGIF')).LoadFromFile(a1);
<------------- AV
// try
ExecProc;
// except ???
end;
end;
end;
This is probably due to the invalid typecase TBlobField. How can I solve
this problem?
Also what would the try except block typically look like?
Kind regards,
Ronan van Riet