Hi Guys
I have a few questions on BLOBS and datagrids and will appreciate some sample code here.
I have managed to create a form with a datagrid on it , and a image object that retrieves the images from the cloud when a user hilites a line on the grid. This is designed as a cloudcall and not a local call , so its a tad slow.
here is a vid on how this works : https://www.loom.com/share/d609c74551df48309f51723192353039
here is the code:
Here is question 1. Its a cloud call but the path to the image ends up being a local path? Its pretty slow ,( perhaps because I'm living in a rural farm town) Does the system download the image if its a cloud based call or just look in the local Blobs table if it exists?
so I tried to resize all images to under 10kb and that helped a lot. Much faster, so I tried to put the text of the image into a table key, (not a BLOB table) figuring I can just store the text into the key and then that should speed it up more if its just a 100x80 pixel .png thumbnail. LCM did not seem to allow this? can we actually do that? Or will it totally mess up the performance?
Question 3 , Is it possible to put a thumbnail of a BLOB into a DataGrid? and if so, is it possible to only load the images that will be visible to the user (IE. only when the lines are visible on his screen. Will appreciate some help with this.
I am designing a system with at least 70000 product items and God help a tablet trying to load ...lets say 30000 thumbnails if a query is run. It will probably die...although it will be interesting to test. So the idea is run a LCM Query and put the results into a DataGrid table with a BLOB in one of the columns.
Question 4. Is it possible to have more than 1 Blobs table? because I feel that it important could separate things like documents and High Res images from thumbnails, because you do not want to sync the High Res Blob table with a thing like a POS system or a tablet.
Would really appreciate some sample code for question 3
I have to say that this is the easiest , most productive database design I have ever seen. I'm a total beginner and did not have to learn a single sql query with the code snippet feature . Thanks Livecloud !!!
Keep safe everyone!
Sid
I have a few questions on BLOBS and datagrids and will appreciate some sample code here.
I have managed to create a form with a datagrid on it , and a image object that retrieves the images from the cloud when a user hilites a line on the grid. This is designed as a cloudcall and not a local call , so its a tad slow.
here is a vid on how this works : https://www.loom.com/share/d609c74551df48309f51723192353039
here is the code:
Code:
local tBlobGridRef, tPathToBlob, theLine, theSelectedID, tPHtender
getProp uSelectedPicID
put the dgHilitedLines of me into theLine
return GetDataOfLine(theLine,"blobReference")
end uSelectedPicID
on selectionChanged pHilitedIndex, pPrevHilitedIndex
show widget "PHSpinner"
put empty into tBlobGridRef
put empty into tPathToBlob
put the uSelectedPicID of group "Tenders" into theSelectedID
put cdb_readBlob(theSelectedID,"cloud") into tPathToBlob
set the filename of image "tenderPicViewer" to tPathToBlob
//set the text of image "tenderPicViewer" to tPathToBlob
put the text of image "PHTender" into tPHtender
if tPathToBlob is empty then set the text of image "tenderPicViewer" to tPHtender
hide widget "PHSpinner"
end selectionChanged
Here is question 1. Its a cloud call but the path to the image ends up being a local path? Its pretty slow ,( perhaps because I'm living in a rural farm town) Does the system download the image if its a cloud based call or just look in the local Blobs table if it exists?
so I tried to resize all images to under 10kb and that helped a lot. Much faster, so I tried to put the text of the image into a table key, (not a BLOB table) figuring I can just store the text into the key and then that should speed it up more if its just a 100x80 pixel .png thumbnail. LCM did not seem to allow this? can we actually do that? Or will it totally mess up the performance?
Question 3 , Is it possible to put a thumbnail of a BLOB into a DataGrid? and if so, is it possible to only load the images that will be visible to the user (IE. only when the lines are visible on his screen. Will appreciate some help with this.
I am designing a system with at least 70000 product items and God help a tablet trying to load ...lets say 30000 thumbnails if a query is run. It will probably die...although it will be interesting to test. So the idea is run a LCM Query and put the results into a DataGrid table with a BLOB in one of the columns.
Question 4. Is it possible to have more than 1 Blobs table? because I feel that it important could separate things like documents and High Res images from thumbnails, because you do not want to sync the High Res Blob table with a thing like a POS system or a tablet.
Would really appreciate some sample code for question 3
I have to say that this is the easiest , most productive database design I have ever seen. I'm a total beginner and did not have to learn a single sql query with the code snippet feature . Thanks Livecloud !!!
Keep safe everyone!
Sid