Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FSEEK
Message
From
29/08/2001 11:27:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/08/2001 11:14:55
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: FSEEK
Miscellaneous
Thread ID:
00550347
Message ID:
00550360
Views:
13
>Ha guys, I am having a problem with FSEEK, I want FSEEK to return to me the line number of the file I am on Ex: If I have 100 records how do I move the pointer to say record 1 and have fseek return 1 or record 100 and return 100?
>
>We are using FSEEK(.nimporthndl,0,1) after going to the EOF. We expected to get a return value of 100, but we get number of BYTES 36400.

fseek() moves by bytes. fgets() is a way :
lnLine = 100
for ix=1 to lnLine
 if feof(handle)
   exit
 endif
 lcLine = fgets(handle)
enddo
However creating a temp cursor, appending type SDF (delimited), going to rec 100 is faster IMHO.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform