Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Indy Message and Clob
Mon, Jul 7 2008 9:42 AMPermanent Link

"Uli Becker"
Hi,

I tried this code to get the contents of a clob-field into an Indy idMessage
component:

 ms :=
TEDBBlobStream.Create((TMemoField(dm.MessagesTable.FieldByName('Message'))),
bmread);
 try
   idmessage.LoadFromStream(ms);
   ShowMessage(IntToStr(idMessage.Headers.count));
 finally
   ms.Free;
 end;

That doesn't seem to work. (Max line length exceeded.)

Can you give me a small sample how to do this? (idMessage requires TStream).

Thanks Uli

Mon, Jul 7 2008 10:07 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

I don't think you need the TMemoField just

ms := TEDBBlobStream.Create(dm.MessagesTable.FieldByName('Message'),bmread);

should do.

However, I can't see that being the problem, especially since streams (AFAIK) don't have a length limitation (as part of some testing I was loading 15Mb into one) and I'm not aware of one in a TMemoField. The most likely place is the Indy components. Which line gives the error?

Roy Lambert [Team Elevate]

ps I dumped Indy a long time ago and use Synapse now

Mon, Jul 7 2008 11:27 AMPermanent Link

"Uli Becker"
Roy,

thanks.

ms := TEDBBlobStream.Create(dm.MessagesTable.FieldByName('Message'),bmread);

No change.

<<
The most likely place is the Indy components. Which line gives the error?
>>

Just switched to Delphi2007 and don't seem to have the sources. So I can't
tell you.

Uli.


Mon, Jul 7 2008 1:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< Can you give me a small sample how to do this? (idMessage requires
TStream). >>

You might want to ask this on the Indy newsgroups.  Your ElevateDB code
looks okay, so it's most likely something that the Indy code doesn't like
about the message that you're loading.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jul 7 2008 2:16 PMPermanent Link

"Uli Becker"
Tim and Roy,

> You might want to ask this on the Indy newsgroups.  Your ElevateDB code
> looks okay, so it's most likely something that the Indy code doesn't like
> about the message that you're loading.

OK, good advice. Thanks to both.

Uli
Tue, Jul 8 2008 1:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli


><<
>The most likely place is the Indy components. Which line gives the error?
>>>
>
>Just switched to Delphi2007 and don't seem to have the sources. So I can't
>tell you.

Errm, in your code?

But if you don't have the sources are you sure that the version of Indy you're using is OK with D2007?

Roy Lambert [Team Elevate]
Tue, Jul 8 2008 1:43 AMPermanent Link

"Uli Becker"
Roy,

> But if you don't have the sources are you sure that the version of Indy
> you're using is OK with D2007?

I't s the version that's shipped with Delphi. But I'll look for the latest
snapshot and install it. Thanks.

Uli

Image