Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FDBatchMoveTextReader - Skiping given number of lines


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Feb 1, 2016 6:04 AM Last Post By: Dmitry Arefiev
Ertan Kucukoglu

Posts: 49
Registered: 7/4/09
FDBatchMoveTextReader - Skiping given number of lines  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 28, 2016 4:45 PM
Hi,

Is it possible to skip given number of first lines in a text file when Executing FDBatchMove?

Thanks.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FDBatchMoveTextReader - Skiping given number of lines  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 28, 2016 8:06 PM   in response to: Ertan Kucukoglu in response to: Ertan Kucukoglu
You can try to use TFDBatchMove.OnWriteRecord and return
AAction=paSkip required number of time.

--
With best regards,
Dmitry
Ertan Kucukoglu

Posts: 49
Registered: 7/4/09
Re: FDBatchMoveTextReader - Skiping given number of lines  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 31, 2016 8:00 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Will this prevent me getting an error for a file like below? I mean, First line is not comma separated.

No.001
15/ 8/29 01:31:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.4,   8.7,   8.0,   8.8
15/ 8/29 01:32:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.4,   8.6,   8.1,   8.9
15/ 8/29 01:33:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.4,   8.6,   8.1,   8.9
15/ 8/29 01:34:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.3,   8.6,   8.0,   8.8
15/ 8/29 01:35:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.3,   8.6,   8.1,   8.8
15/ 8/29 01:36:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.3,   8.6,   8.1,   8.8
15/ 8/29 01:37:56,    0,    0,    0,    0,    0,    0,    0,    1,   8.3,   8.6,   8.1,   8.8
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FDBatchMoveTextReader - Skiping given number of lines  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 1, 2016 6:04 AM   in response to: Ertan Kucukoglu in response to: Ertan Kucukoglu
FireDAC will try to parse this line and will fail. To avoid that, you should
create a stream on your own, skip first line on your own, then to assign
the stream to TFDBatchMoveTextReader.Stream property instead of
a value to FileName.

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02