[Gambas-user] Help with some parsing
Benoît Minisini
gambas at ...1...
Tue Feb 17 09:48:30 CET 2009
> I'm importing some old data from windows. The data is exported from
> msAccess97 and some of the text fields have a carriage return of some sort
> in the middle. The same character seems to be used by access as the end of
> line for each record, so when I try and import it, I'm getting a truncated
> line, which then mucks up the next line
>
> I wondered how one could check this
>
> eg: If I look at the file in a text editor with line numbers:
>
> 1 Doe|john|01/02/1950|some text in here saying something
> 2 Smith|Peter|19/02/1944|also some text
> 3 but is split onto a new line so the parser crashes
> 3 Brown|Michael|17/05/1966|but this line is ok
>
> ie: there is a character in there that here I've designated as [xx] which
> is intrepreted as a new line
>
>
> 1 Doe|john|01/02/1950|some text in here saying something
> 2 Smith|Peter|19/02/1944|also some text [xx]
> 3 but is split onto a new line so the parser crashes
> 3 Brown|Michael|17/05/1966|but this line is ok
>
> So my quesitoni is 'how to discover what the character is ?chr$(10)(13)
> and how to eliminate those before parsing.
>
> Thanks in anticipation.
>
> richard
>
Did you see the data import dialog in the database manager of Gambas 2? There
is the same dialog in Gambas 3, but the Gambas 3 database manager is
deprecated, so you should use the Gambas 2 one.
Regards,
--
Benoît
More information about the User
mailing list