Recent

Author Topic: What's CSVExporter1.FormatSettings.Quotestrings ?  (Read 1524 times)

mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
What's CSVExporter1.FormatSettings.Quotestrings ?
« on: November 29, 2017, 11:32:56 pm »
I am switching to a new computer.
Old configuration is windows7 32bit, lazarus 1.4.2, 32bit.
New configuration is windows10 64bit, lazarus 1.6.4, 32bit.

My existing project compiles and runs under old configuration.
Same project under new configuration is compiling and producing .exe but imediately fails to run, shows this (picture attached):
Quote
CSVExporter1.FormatSettings.Quotestrings : Unknown property "QuoteStrings".

What is this, I've tried to find out, I've tried to google it , but nothing came up.
Anybody knows what is this ?

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: What's CSVExporter1.FormatSettings.Quotestrings ?
« Reply #1 on: November 29, 2017, 11:53:45 pm »
QuoteStrings was removed two years ago when the csvexporter was rebuilt to use the csvbuilder. It does not look as if another property has taken its job.

Quotestring, in the old version, was declared as
Code: Pascal  [Select][+][-]
  1.   // Quote string fields if value contains a space or delimiter char.
  2.   TQuoteString = (qsAlways,qsSpace,qsDelimiter);
  3.   TQuoteStrings = Set of TQuoteString;
and seems to define some rules when cell strings are quoted.

A comment in TCSVBuilder now says
Code: Pascal  [Select][+][-]
  1.     // Character used to quote "problematic" data
  2.     // (e.g. with delimiters or spaces in them)
  3.     // A common quotechar is "
  4.     property QuoteChar: TCSVChar read FQuoteChar write SetQuoteChar;
  5.  
This seems to indicated that strings now are not quoted any more, only if a cell contains spaces or delimiters, i.e. like QuoteChar = [qsSpace, qsDelimiter].

If you have this situation then I think you can safely remove the QuoteString from your code.

jamie

  • Hero Member
  • *****
  • Posts: 6131
Re: What's CSVExporter1.FormatSettings.Quotestrings ?
« Reply #2 on: November 29, 2017, 11:58:56 pm »
Sounds like the form file needs to have it removed..

The lfm file for the form needs to have the Published property removed or renamed?

The only true wisdom is knowing you know nothing

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: What's CSVExporter1.FormatSettings.Quotestrings ?
« Reply #3 on: November 30, 2017, 12:00:41 am »
you seem to have changed more than your OS and hardware. What you see is the streaming mechanism (for the lfm file) trying to set a property that has been removed in the newer version of the library you are using(export import library).
To solve this problem you have to open the lfm files that have a CSVExporter1 component in them and delete the line for the quotedstrings property. A more visual way to do it is to open the form in the designer ignore the error that pops up and save it, overriding the deleted properties in the process.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018