IdMessage Streaming issue Indy 10

Giganews Newsgroups
Subject: IdMessage Streaming issue Indy 10
Posted by:  slappyhack (slappyha…@gmail.com)
Date: Fri, 17 Mar 2006

I have question that I hope one of you can answer (I'll supply whatever code you need just ask).  I stream a message into the database, the message contains a body and attachments begore they go into the blob field (i know this because I see the data and save it to seperate fields).

but when I strean it out there is no subject, from, to or body?

Into the database

EntireMess := Tmemorystream.create;
EntireMess.Position := 0;
TheMsg.SaveToStream(EntireMess);
EntireMess.Position := 0;

method
DataQueue.LoadMsgObjToDB(EntireMess, intMessageID, trim(strTID), fstrSystem, '-99999');

out of the database:

      QueryStream.SQL.Text := trim(strSQL);
          QueryStream.ParamByName('messageid').AsInteger := intMessageID;
          QueryStream.Open;
          QueryStream.First;
          QueryStream.Edit;
          QueryStreammattachement.SaveToStream(stream);
            // showmessage(inttostr(sizeof(stream)));
          stream.Position := 0;
          themsg.LoadFromStream(stream);

Replies