Writing StringColleciton to an MS Access Long Text field

  • Thread starter Thread starter Ray Porter
  • Start date Start date
R

Ray Porter

Guest
Hi,

I'm in the process of converting an old Delphi program to C#. The data is stored in an MS Access DB. The program has an in-memory object that encapsulates the data and much of the program functionality. Among the fields in the object are a number of fields that are implemented as TStringList in Delphi. The Delphi code uses the TStringList.Text property to write the data to an MS Access LongText field. On the windows forms, the data is displayed (in Delphi) in TMemo fields. In C#, it is displayed in multi-line text boxes. When I attempt to insert a line in the Access DB from C#, I get an error that seems to be objecting to the embedded NewLine characters in the data.

How should I go about this? Is a StringCollection not the correct object to use to replace a Delphi TStringList. I do need to preserve the line breaks in the data when I write to the DB.


Thanks,

Ray

Continue reading...
 
Back
Top