[Gambas-user] pictures inside a DB
Hamilton Geminiano Andrioli Junior
handriolijr at ...626...
Fri Mar 30 14:55:03 CEST 2007
Steven, i didn't understand your code.
see:
' DIM sData AS String
' sData = File.Load("/file/path")
' MyResult!MyBlobField = sData
How can i make a database connection. I said that, because i work only
with SQL, and to update a database i use "update customers set
picture='" & Sdata & "' where id=xx"
If i make what you said, Gambas returns me: Result is read-only.
What i'm doing wrong?
[]'s
Hamilton From Brazil!
Steven Lobbezoo escreveu:
> 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
>>
>
> -------------------------------------------------------------------------
> 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