[Gambas-user] pictures inside a DB

Steven Lobbezoo steven at ...1652...
Mon Mar 26 17:54:32 CEST 2007


  rsK = db.Exec("select Thumb, Id from Photos where prop_num = " & Str(Id))
  IF rsK.available = TRUE THEN 
    FOR EACH rsK
      sData = rsK!Thumb.Data 
      ' write the photo to local file
      File.Save("~/TempPhot" & Str(rsK!Id) & ".jpg", sData)
      ' Fill with the image
      AddImage("~/TempPhot" & Str(rsK!Id) & ".jpg", Str(rsK!Id)) 
      KILL "~/TempPhot" & Str(rsK!Id) & ".jpg"

AND

' TO put a file inside a blob field: 
 
' DIM sData AS String 
' sData = File.Load("/file/path") 
' MyResult!MyBlobField = sData 
 

Well, I only got a lot of help, and adapted it a bit.
Still looking for a possibility to read blobs without
writinig them to files !

Steven



Le lundi 26 mars 2007 18:18, Hamilton Geminiano Andrioli Junior a écrit :
> Please, i have to put some pictures inside a mysql database.
> How can i save and retrieve those?
>
> Anyone can help me?
>
> thanks.
>
> Hamilton
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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