> I've got a file in a hard disk (fomat "clients.txt"). With an
> Xtra File IO i
> get read all the database, but i would like to read only a record.
>
> Name      City     Salary
> Bohanen   Geneva   4567
> Klein     Bern     389
> Meister   Lugano   9876
> Correia   Basel    7055
> etc...

I prefer to use a list format for databases that I do in text files.
possibly something like this (untested lingo!):

[ [#name:"Bohanen", #city:"Geneva", #salary:"4567"], [#name:"Klein",
#city:"Bern", #salary:"389"], [#name:"Meister", #city:"Lugano",
#salary:"9876"], [#name:"Correia", #city:"Basel", #salary:"7055"] ]

read in the entire list from the text file using standard FileIO.
reconstitute it as a list using

 myList = value(myList)

then get at the data in the normal way you would for any list. this
makes things lots easier. the only problem is if it is a really big
list, then there can be difficulties. of course some may say that if
it is that big you should be using a real database! <grin>

hth

Al Hospers
CamberSoft, Inc.
al<at>cambersoft<dot>com
http://www.cambersoft.com

A famous linguist once said:
"There is no language wherein a double
positive can form a negative."

YEAH, RIGHT



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to