I am trying to grab a group of data from a local sqlite database and insert that data into a datagrid directly. The main objective here is speed. I'm willing to limit my calls to 50, if not 25 rows at a time. However, I'm also displaying thumbnails in this datagrid as well. I found a way to get this done by using this lesson:
http://lessons.runrev.com/s/lessons/m/d ... ts-of-data
However, I just realized that there's no way to get the data associated with each row from doing this. Atleast that's as far as I can understand about this method. The thumbnails are quite small, relatively 25kb per. But with cached controls turned on (for smooth scrolling), I cannot manage to get this data into my datagrid in under a second. If I turn of cache controls, 50 records takes less than half a second even with the thumbnails. However, once this data goes into the datagrid, I also need to be able to get the data associated within each row at any time. As with this lesson, I am not able to do so.
What I'm needing is a way to grab data from a sqlite local database, put that data into a datagrid with thumbnails (the thumbnails are not binary, they are urls but not being inserted as urls, "set filename of image to *http: link goes here*") all in under 2 seconds. It doesn't seem like a complex thing to do but I'm at the point of just going in circles now. Any feedback would be greatly appreciated. Thanks!
Database to DataGrid to Display FAST!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Database to DataGrid to Display FAST!
Hi cenglish,
Just a quick response.
Simon
Just a quick response.
Isn't this the thing that is holding everything back? Fetching images from a server?"set filename of image to *http: link goes here*"
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Database to DataGrid to Display FAST!
This may inspire you: http://livecodeshare.runrev.com/stack/7 ... administer
Then modify ConvertSQLCursorToArray in card "Data" script, in order to show image.
Otherwise you could:
Then modify ConvertSQLCursorToArray in card "Data" script, in order to show image.
Otherwise you could:
- retrive your data
- ceate a card from zero
- insert all the elements, text and images
- put the clickable text to "prev 50 / next 50". This delete the card and create a new one.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w