Subject Re: [IBO] INSERT BLOB
Author Ronan van Riet
Hello.

I was successful in INSERTing the record using a memory stream. But I would still like to know how this can be done "directly", using the LoadFromFile method.

Ronan
----- Original Message -----
From: Ronan van Riet
To: IBObjects@yahoogroups.com
Sent: Tuesday, January 06, 2004 8:48 PM
Subject: [IBO] INSERT BLOB


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





___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !



------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/

b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]