PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Multiple images in a table column
Multiple images in a table column
Iniciado por joren, 23,ago. 2020 23:10 - 2 respuestas
Publicado el 23,agosto 2020 - 23:10
Hi

In our software we have a database like this:

TABLE A
- TABLEA_ID
- ...

TABLE B
- TABLEB_ID
- TABLEA_ID
- IMAGE

Every row in table A can have multiple images attached.
Now i want to display all those images for one table A row in one table column. It's important they can all be diplayed in one column (small images next to each other). So: Each row of Table A has one row in the table control. All the images from Table B for this table A record have to be added in this row.

I tried changing the column to container and adding a looper with one attribute (Image control). It works, but filling the table is extremely slow. If I remove the looper, the table fills fast, so the looper is definitly the problem.

Anyone can help me out? Are there any other ways to do this?
Publicado el 24,agosto 2020 - 14:50
there are other ways, BUT...and that's a big one, it seems to me that it's completely normal that the end result is slow, as you are reading multiple images per line, which means reading potentially 10s of megabytes per line instead of just a few bytes...

The only way you can have something like that go fast is if you prepare it beforehand (ie the time cost is moved somewhere else)...

One way to achieve that would be to prepare ONE miniature image with all the images of a line each time you add an image in file B... You can do that using two image fields and the dxxx functions.... This would slow down a little each add in the B file, but you would have only one miniature image to load per line instead of multiple too big images.
Publicado el 25,agosto 2020 - 10:05
Thanks for your answer.
The images i want to load in the table are very small, 16x16 and only few bytes.

It still goes extremely slow. If i put the images in seperate columns it runs fast.