When I declare a variable like this :
Var Stream : TBlobStream;
I get an error :
undeclared identifier
So what is the problem? How can I solve this?
When I declare a variable like this :
Var Stream : TBlobStream;
I get an error :
undeclared identifier
So what is the problem? How can I solve this?
You don't declare a variable of that type.
You call, for instance, CreateBlobStream
on a dataset and then read or write with that stream.
Note that CreateBlobStream
has return type of TStream
. That's the abstract base class for all streams. The actual runtime type will be a concrete derived class, but don't need to know the actual runtime type to use this. In this way you are insulated from the implementation details.
So you would declare a local variable of type TStream
and assign the value returned by CreateBlobStream
to that variable. The Fish Facts example demonstrates this: http://docwiki.embarcadero.com/CodeExamples/en/FishFacts_(Delphi)
You can use the abstract TStream
class here. That's just what the CreateBlobStream method returns.