Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FSEEK
Message
De
29/08/2001 11:27:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/08/2001 11:14:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: FSEEK
Divers
Thread ID:
00550347
Message ID:
00550360
Vues:
12
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform