Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 17 of 17 total
Thread CR LF problem after export and re-import
Fri, Jan 30 2009 6:05 AMPermanent Link

Uli Becker
Roy

> Try with standard components - that's all Tim's using in ElevateDB. The other thing to try is to examine the characters and see what you have in the clob field (ie clobfield.asstring) below #32

It's not the component. I parsed the string - after the re-import there
are only #13, before there were #13#10. That's the reason.

Regards Uli
Fri, Jan 30 2009 7:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

>It's not the component. I parsed the string - after the re-import there
>are only #13, before there were #13#10. That's the reason.

That sounds like a bug, but I'm surprised at a memo type component that doesn't cope with it.

Roy Lambert [Team Elevate]
Fri, Jan 30 2009 7:58 AMPermanent Link

Uli Becker
Roy,

> That sounds like a bug, but I'm surprised at a memo type component that doesn't cope with it.

I insert the signature into the memo by using this code:

MySignature := dm.BenutzerTableDefaultGrussformel.AsString;
edText.Lines.add(' ');
edText.Lines.add(MySignature );

So with only #13 it's just one line for the memo.

whereas this code works:

MySignature := dm.BenutzerTableDefaultGrussformel.AsString;
edText.Lines.add(' ');
edText.Lines.text := edText.Lines.text + MySignature;

I'll change my code and it's ok. Maybe it's a minor bug with the export
or import.
Thank you for your help.

Regards Uli
Fri, Jan 30 2009 10:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

That has me baffled

>edText.Lines.add(' ');
>edText.Lines.add(MySignature );

Will have two lines in edText, the first line holding a single space and the second with MySignature

>edText.Lines.add(' ');
>edText.Lines.text := edText.Lines.text + MySignature;

That should result in just one line holding a space plus MySignature

Roy Lambert [Team Elevate]
Fri, Jan 30 2009 10:15 AMPermanent Link

Uli Becker
Roy,

>> edText.Lines.add(MySignature );
> Will have two lines in edText, the first line holding a single space and the second with MySignature

True, and because of the missing #10: only one line of MySignature

>> edText.Lines.add(' ');
>> edText.Lines.text := edText.Lines.text + MySignature;
>
> That should result in just one line holding a space plus MySignature

Obviously MSignature is added with a new line. Do you see a different
result?

Uli
Fri, Jan 30 2009 12:30 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli


I hadn't realised that Lines added a crlf pair after an add operation. Looking through the VCL I still can't find where Smiley I did try some experiments


procedure TForm1.Button1Click(Sender: TObject);
var
sl: TStringList;
begin
sl := TStringList.Create;
sl.Add('a');
sl.Add('b');
showmessage(inttostr(length(sl.Text))); <<<<<<<<<<<<<< shows 6 ie crlf added between and after add
sl.Clear;
sl.add('a');
showmessage(inttostr(length(sl.Text + 'b'))); <<<<<<<<<<< shows 4 crlf added after add
sl.Free;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
memo1.lines.add('a');
memo1.Lines.add('b');
memo1.Lines.Text := memo1.lines.Text+'c';
end;

memo1 shows

a
b
c

Roy Lambert
Sun, Feb 8 2009 9:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I exported all tables by using the default options. After reimporting the
data I have a problem with clob-fields containing CR/LF: >>

Yes, it's a bug.  It's skipping the LF characters during import.  A fix will
be in 2.02 B8.

--
Tim Young
Elevate Software
www.elevatesoft.com

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image