[Gambas-user] Images / Pictures and DB's

Benoit Minisini gambas at ...1...
Tue Apr 10 23:23:07 CEST 2007


On jeudi 8 mars 2007, Steven Lobbezoo wrote:
> Hi,
>
> I'm just starting up using gambas.
> It seems to be a freat solution for RAD, but ......
> the problems are allways in the details.
> I have a few questions :
>
> 1. Is it really obligatory to save a blob i get from the MySQL database
> as a file first, and then read it into some unit (a flield in a
> gridview in this case). If I just assign them, gambas says: expected a
> picture, got a blob instead !. I try to do this :
>  GridView1.data.Picture = .rs1[arrtable[Column]]
> Seems very combersume and slow.

At the moment this is the only way.

This is slow not because you get a Blob object, but because the SQL request 
want the binary data to be encoded in a string. So reading or writing a blob 
field needs a long encoding/decoding process.

> 2. Why cannot I use the data-aware controles from Qt, and just set their
> properties to table so and so ...., would be much easyer.

You can do that with the controls provided by the gb.db.form component.

> 3. Is there a way I can use Ajunta or Qt designer to make my windows, and
> than use their output in Gambas ?

I don't think so, as these are tools dedicated to C/C++. But after all, gambas 
form files are text files, and Ajunta/Qt designer files are text files too I 
think. So maybe one can write a translator...

Regards,

-- 
Benoit Minisini




More information about the User mailing list