Re: [Gambas-user] Blob management

2009-06-26 Thread Benoît Minisini
> 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

Re: [Gambas-user] Blob management

2009-06-26 Thread David Villalobos Cambronero
t 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 To: mailing list for gambas users Sent: Friday, June 26, 2009 10:04:27 AM Subject: Re: [Gam

Re: [Gambas-user] Blob management

2009-06-26 Thread Benoît Minisini
> 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`") >

Re: [Gambas-user] Blob management

2009-06-26 Thread David Villalobos Cambronero
iling list for gambas users Sent: Friday, June 26, 2009 9:15:43 AM Subject: Re: [Gambas-user] Blob management > I do this: > > DIM hResultado AS Result > DIM sImagen AS String > > IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas" > h

Re: [Gambas-user] Blob management

2009-06-26 Thread Benoît Minisini
> I do this: > > DIM hResultado AS Result > DIM sImagen AS String > > IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas" > hResultado = $hConn.Exec("SELECT * FROM `Imagenes`") > sImagen = hResultado["Imagen"].Data <--- Fails here > "Not an object" Well, that means that h

Re: [Gambas-user] Blob management

2009-06-26 Thread Ron
David Villalobos Cambronero wrote: > I do this: > > DIM hResultado AS Result > DIM sImagen AS String > > IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas" > hResultado = $hConn.Exec("SELECT * FROM `Imagenes`") > sImagen = hResultado["Imagen"].Data <--- Fails here > "Not

Re: [Gambas-user] Blob management

2009-06-26 Thread David Villalobos Cambronero
;] File.Save("/tmp/mas/1.jpg", sImagen) Saves an empty file. Regards -- David - Original Message ---- From: Benoît Minisini To: mailing list for gambas users Sent: Friday, June 26, 2009 8:21:41 AM Subject: Re: [Gambas-user] Blob management > It doesn't work, the

Re: [Gambas-user] Blob management

2009-06-26 Thread Benoît Minisini
> It doesn't work, the file is saved emty. > > Benoit, any idea? > > Regards > > > -- > David > > What happens if you put the blob data into a string variable before using File.Save() ? -- Benoît -- __

Re: [Gambas-user] Blob management

2009-06-26 Thread David Villalobos Cambronero
It doesn't work, the file is saved emty. Benoit, any idea? Regards -- David - Original Message From: Werner To: mailing list for gambas users Sent: Thursday, June 25, 2009 9:39:52 PM Subject: Re: [Gambas-user] Blob management David Villalobos Cambronero wrote: > Forgo

Re: [Gambas-user] Blob management

2009-06-25 Thread Werner
T * FROM `Pics`") > File.Save("/tmp/1.jpg", hResultado["Pic"].Data) > > Or can you provide me an example of saving to disk an image stored in a > database? > > > Regards > > > -- > David > > > > ----- Original Message

Re: [Gambas-user] Blob management

2009-06-25 Thread David Villalobos Cambronero
de me an example of saving to disk an image stored in a database? Regards -- David - Original Message From: Benoît Minisini To: mailing list for gambas users Sent: Thursday, June 25, 2009 3:29:20 PM Subject: Re: [Gambas-user] Blob management > Hi, is there a problem with this instuc

Re: [Gambas-user] Blob management

2009-06-25 Thread Benoît Minisini
> Hi, is there a problem with this instuction? > > hResultado = $hConn.Exec("SELECT Pic FROM Pics") > File.Save("/tmp/1.jpg", hResultado["Pic"].Data) > > > I can't get them work! > > Regards > > > -- > David > Can you give more details? (versions, database driver)... Does the PictureDatabase

Re: [Gambas-user] Blob management

2009-06-25 Thread Charlie Reinl
Am Donnerstag, den 25.06.2009, 12:47 -0700 schrieb David Villalobos Cambronero: > Hi, is there a problem with this instuction? > > hResultado = $hConn.Exec("SELECT Pic FROM Pics") > File.Save("/tmp/1.jpg", hResultado["Pic"].Data) > Don't know nothing about Blob'S, but I'm not sure, even if yo

[Gambas-user] Blob management

2009-06-25 Thread David Villalobos Cambronero
Hi, is there a problem with this instuction? hResultado = $hConn.Exec("SELECT Pic FROM Pics") File.Save("/tmp/1.jpg", hResultado["Pic"].Data) I can't get them work! Regards -- David -- ___