[Gambas-user] Blob management
David Villalobos Cambronero
david_villalobos_c at ...43...
Fri Jun 26 18:14:30 CEST 2009
Form MySQL 5.1 Manual, page 603:
- Data Type - - Storage Required -
BLOB, TEXT L+2 bytes, where L < 2^16
MEDIUMBLOB, MEDIUMTEXT L+3 bytes, where L < 2^24
LONGBLOB, LONGTEXT L+4 bytes, where L < 2^32
I just need 2^24 not 2^32. Since LONGBLOB is not a VARBLOB I thnik it will take all the space.
But I'm not a mysql expert.
Regards
--
David
----- Original Message ----
From: Benoît Minisini <gambas at ...1...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Friday, June 26, 2009 10:04:27 AM
Subject: Re: [Gambas-user] Blob management
> Hi, first of all thanks to Benoit, Ron and Wener for help me.
>
> Just to be clear if someone reads this in the future, these statementst are
> correct:
>
> DIM hResultado AS Result
>
> IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas"
> hResultado = $hConn.Exec("SELECT * FROM `Imagenes`")
> File.Save("/tmp/mas/1.jpg", hResultado["Imagen"].Data)
>
>
>
> The problem is that gambas espect a longblob and my field is mediumblob, if
> I change the datatype to longblob the statements above work fine.
>
> So, I think this was the problem, BUT, the problem is that the pictures I
> want to storage are not that big, so I will waste some space, Bonoit, can
> you (actualy you) change this interpretation of the Gambas database
> component? to use more optimal datatypes? Maybe for Gambas3?
>
> Regards
>
>
> --
> David
>
>
I don't think you will waste any space by using longblob (or longtext) instead
of mediumblob (or mediumtext). Why do you think that?
--
Benoît
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list