Page 1 of 1
Datagrid Stack Based Database
Posted: Mon May 01, 2017 2:23 pm
by PeterG
HI
Is it possible to use a the datagrid in a stack based
Database.
Thanks
Peter G
Re: Datagrid Stack Based Database
Posted: Mon May 01, 2017 2:44 pm
by dunbarx
Hi.
Well, certainly, just as it is possible to use a table field, or any other ordered concoction of controls. You would have to write your own retrieval, sorting and relationship gadgetry.
I have done this sort of thing for many years, just like most others here, but I am not sure anyone but me would call it a true "database". That I write my own functionality is fine for me, but I assume that only touches on the typical functionality of a mainstream piece of software.
Craig Newman
Re: Datagrid Stack Based Database
Posted: Mon May 01, 2017 2:57 pm
by PeterG
Hi Craig
Thanks for your reply.
My reason for opting for stack based database is that there will most probably never be more that about 3000 records in this database. Am I correct in this approach, or should I go for MySQL or something similar.
Many Thanks
Peter G
Re: Datagrid Stack Based Database
Posted: Mon May 01, 2017 4:18 pm
by FourthWorld
As cards, you may find that going much above 3000 records may slow saves and to a lesser degree loading. But using custom properties in a stack file, either as a list in a single property or using array notation in a property set, can be lightning fast, with the additional benefit of separating UI from content so either can be changed independently of the other.
But if using a stack file for storage separate from your UI stacks is good, using a separate file can be even better. This can be text, XML, encoded arrays - many options are available.
And of course you can also use a database engine for storage, and the SQLite engine included with LC is a good one.
Which of these is best will depend on the specifics of your app. And if 3000 represents a maximum number of records you could even just keep storing data in fields on cards; I find the slowness with saving doesn't really become very noticeable until it gets closer to 5000.
That said, unless this is just a quickie thing for your own personal use, there are many benefits from separating data and UI, so I usually advocate any external storage and paging data into a single card for viewing.
Re: Datagrid Stack Based Database
Posted: Sat May 20, 2017 6:38 pm
by TerryL
Hi gagsoft. Here are links to a LiveCode lessons stack (Beginner Lab) that includes an example of a simple stack database (Rolodex). Maybe it will give you some ideas for your project. Terry
Direct Download:
https://docs.google.com/uc?export=downl ... mJqZ0JZdE0
Website Download:
https://tlittle72.neocities.org/info.html
Re: Datagrid Stack Based Database
Posted: Tue May 23, 2017 8:23 am
by MaxV
However keep in mind that SQLite is embedded in livecode.
Re: Datagrid Stack Based Database
Posted: Mon Jun 12, 2017 6:35 pm
by TerryL
I made another stack database with a table field that looks similar to a datagrid table using BN's brilliant alternating colored lines routine. It could have other applications. Also with subtractive search, easy setup & data entry, sorting, three reports to PDF. Terry

- DataBase.jpg (18.66 KiB) Viewed 5945 times
Re: Datagrid Stack Based Database
Posted: Tue Jun 27, 2017 1:52 pm
by chipsm
I just found your sample and it gives me ideas.
I new that there were ways of creating a datagrid type of interface and this is great.
Thanks for your contribution. I am studying this sample with great expectations.