Loading image data from DB
Dave Cragg
dcragg at lacscentre.co.uk
Wed Apr 5 18:55:25 EDT 2006
On 5 Apr 2006, at 23:37, Devin Asay wrote:
> I know this can be done, but it's got me stumped. Nothing
> conclusive from archives.
>
> I want to store image data in a mysql database and then show it in
> an image object in Rev. I successfully loaded an image into a field
> of type longblob. I know the data is there and that it's valid.
>
> This is what I tried to load the image data:
>
> global connID -- my connection id
>
> on mouseUp
> if connID is empty then
> answer "You need to connect to the database first."
> exit to top
> end if
> put word 2 of the selectedline of fld "linenumbers" into tEntryNum
> put "select illustration from vocablist where item_index = " &
> tEntryNum into tQuery
> put revDataFromQuery(,,connID,tQuery) into tData
> set the imagedata of img "testImg" to tData
> end mouseUp
Did you try using revQueryDatabaseBlob instead of revDataFromQuery?
Cheers
Dave
More information about the use-livecode
mailing list