Subject Re: [IBO] Error TBlobStream.Create(Query1FILEDATA, bmRead)
Author Helen Borrie
At 03:22 AM 19/03/2008, you wrote:
>Hello,
>i evaluate in this time the IBO components. I will transform
>delphi applications from BDE to IBO. With GReplace is it no problem
>and the application works (no compiler error).
>
>But i became on runtime this error:
>
>Error: 'Ungültige Typumwandlung'
>
>The point is read stream from blob!
>
>Var
> InFile: TBlobStream;
>.
>.
>begin
> Query1.open;

>// InFile := TBlobStream.Create(Query1FILEDATA, bmRead);

InFile := CreateBlobStream(Query1FILEDATA, bmRead);
try
>.
>.

finally
InFile.Free;
end;

>end;
>
>(Query1FILEDATA = BlobField in a IBOQuery)
>
>What can i do?

Tip: it might help to delete the existing persistent field and add it again, then check the TField properties to make sure that the FieldType is correct. I vaguely recall having some initial problems with Blobs after a BDE conversion, oh so long ago!!

Also, use the IBO help. The TIBO- components inherit everything from TDataset but a number of properties and methods have overrides to access features from the internal TIB_BDataset wrapper. If you discover a method or property declaration with Override then that is a clue that something might be a little different.

Helen