2
Well I’m reading the following information from a txt
0016009993|GuilhermeLima|Azul|4|21|basico+completo|6
after reading I am separating the contents using the delimiters "|" to separate into memos, with the code below.
begin
Linha.Delimiter:='|';
Linha.DelimitedText:=Texto[i];
cod:=Linha.Strings[0];
nome:=Linha.Strings[1];
cor:=Linha.Strings[2];
codv := linha.strings[3];
idadade:=Linha.Strings[4];
tipo:=Linha.Strings[5];
id:=Linha.Strings[6];
try
memo1.lines.add(cod);
memo2.lines.add(nome);
memo3.lines.add(cor);
memo7.Lines.Add(codv);
memo4.Lines.Add(idade);
memo5.Lines.Add(tipo);
memo6.Lines.Add(id);
except
ShowMessage('Erro!!! A base de dados não está no padrão correto!');
So far so good, but if the txt is that way
0016009993|Guilherme Lima|Azul|4|21|basico+completo|6
(a space in the name, which would be correct)
values go wrong for memos, why does this occur?
Strictdelimiter line := True; solved my problem.
– Guilherme Lima
What version of your Android?
– David