[Gambas-user] Blob management

David Villalobos Cambronero david_villalobos_c at ...43...
Thu Jun 25 23:44:01 CEST 2009


Forgot to add more details.

And yes, the example works fine but I don't get it to work in my app.

Here is the senario:

I got a table with a picture (just a record) and I want to save it to the disk, (PictureDatabase does it by the PictureBox not directly).

Driver: mysql, Mandriva 2009.1 32 bits, Gambas 2

 
Here are my statements

  DIM hResultado AS Result

  IF NOT Exist("/tmp/mas") THEN MKDIR "/tmp/mas"
  hResultado = $hConn.Exec("SELECT * 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 ----
From: Benoît Minisini <gambas at ...1...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Thursday, June 25, 2009 3:29:20 PM
Subject: Re: [Gambas-user] Blob management

> 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 example work?

-- 
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