All this talk about DataBases - but how to select?
Mark Talluto
userev at canelasoftware.com
Fri Jun 1 00:06:11 EDT 2007
On May 31, 2007, at 3:55 PM, J. Landman Gay wrote:
> Or you could store it in a text file and just read that in. In any
> case, it's all the same approach; store the data as a single text
> variable. With this method, you use offset() or lineoffset() to
> find the record(s) you want, and use a display card to load in each
> record as needed. The display card would have the same number of
> fields as record items (40 in your case) and parse out the record
> data to fill each field appropriately. You need to write your own
> navigation commands with this method, re-filling the fields with
> the next or previous line of data on demand. When the user changes
> cards, you need a closeCard handler that gathers the field data,
> inserts appropriate item delimiters, and writes it back to the
> correct line in the text variable.
>
> This is the method I used for a 40,000 record data set. The data
> was stored in a text file on disk and the application was only a
> single card that displayed the current record. This has the
> advantage of keeping the data separate from the interface, and the
> client only needed to backup the text file.
Here is an example of this method. I use this to customer data and
registration information. Once can easily modify it to match their
needs.
<www.canelasoftware.com/pub/rev/Key_Maker.rev.zip> I removed some
code that makes our key system work. The rest is there for dissection.
It is commented pretty well and is very basic to get someone
started. I have been using it for years and have never had any
problems with the integrity of the data. I tested with with dummy
data in the amount of 100,000 records. It held up just fine.
The data is stored as a text file for easy import into another DB
system. I am sure it can be improved in many ways. Hope it helps
someone just starting out.
Mark Talluto
--
CANELA Software
http://www.canelasoftware.com
More information about the use-livecode
mailing list