Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append text file!!!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00043111
Message ID:
00043369
Vues:
31
Hi Samuel ,

Yes to use the seek key the table has to be indexed to work.
and the alias not found is because the parameters have to be swapped to


sele tempfile
scan for ! seek( fname + lname , "mainfile" )
insert into mainfile....
endscan

let me know if u need further help

Ajay Sanghani
WinSmart Solutions
Building Software Better and Faster !

http://www.winsmart.com
email : ajay@winsmart.com




>>>Hi all,
>>> I currently try to append a text file to my database by using append from command. My problem is I want to check to see is there any duplicate record by compare the person lastname and firstname from the text file with my database. However, I can't read the variable in the text file as a field!! Any ideas on how to read the fields in a text file which delimited by |.
>>
>>probably two steps -- read text file into temp file, then
>>
>>scan temp file
>>if not seek('mainfile',fname+lname)
>>insert into mainfile.....
>>else
>>loop
>>endif
>>endscan
>
>Hi Dave,
>
>I had try your idea, however when I use the seek command it gives me "alias not found" error. Is that because of the 'mainfile' (which is a table) cannot be found in my pc?? Also, I though the seek command can only search for the index key of specific table??
Ajay Sanghani
WinSmart Solutions
Building Software Better and Faster
WebSite : http://www.winsmart.com
Email : ajay@winsmart.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform