BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TStringList LoadFromStream problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
Nikola
Guest





PostPosted: Tue Jan 16, 2007 10:14 pm    Post subject: TStringList LoadFromStream problem Reply with quote



Hello
I am trying to save some TDBGridColumns data into a TMemoryStream, then
fill a TStringList with strings from that stream, and then pass the
text property of the StringList to a ClientDataSet parameter and save
it to the database(some code below):

DBGrid1.Columns.SaveToStream(aMemoryStream);
aStringList.LoadFromStream(aStream);
aQuery.Params.ParamByName('pGridStats').DataType := ftString;
aQuery.Params.ParamByName('pGridStats').AsString := aStringList.Text;

The database field i'm trying to save the data is a CLOB field (Oracle
DB).
The problem is that the LoadFromStream method stops at the first null
character and the aStringList.Text property is exactly this:
'TPF0TColumnsWrapper'. So when I try to do things backward the
DBGrid.Columns.LoadFromStream method raises exception "Stream read
error".

How can I fill the stringlist with all the data from the stream?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.