Page 1 of 1

Storing hundreds of rows

Posted: Sun Aug 30, 2015 10:09 am
by kolia
Hello
I need to import a CSV file that features several hundreds of rows a less that 10 columns in LC environment and make it persitent. This is a kind of read only database that does not need to be displayed. It needs to be queried to retrieve a row of data by code, so direct access to one specific row is needed based on two indexes. I have the feeling that SQLite would be too sophisticated for that kind of job. What would be the best approach?
From time to time,it may be needed to update this table.
Thank you
Nicolas

Re: Storing hundreds of rows

Posted: Sun Aug 30, 2015 1:01 pm
by Klaus
Hi Nicolas,

since FIELD objects have some overhead, better store the file/data in a custom property of the stack!
That will be stored with the stack.
...
set the cMiniDB of this stack to URL("file:"& "path/to/your/file.csv")
## cMiniDB is just a name, replace it with something more meaningful to you!
...
Then use it later:
...
put the cMiniDB of this stack into tDB
## process data here...
...
You get the picture.


Best

Klaus

Re: Storing hundreds of rows

Posted: Sun Aug 30, 2015 3:24 pm
by kolia
Hi Klaus,
Thanks for the advise, I will go that path
All the best
Nicolas

Re: Storing hundreds of rows

Posted: Sun Aug 30, 2015 3:49 pm
by kolia
This is definitely the way to go. Thanks
Nicolas