Loading image data from DB
Devin Asay
devin_asay at byu.edu
Wed Apr 5 20:05:05 EDT 2006
On Apr 5, 2006, at 4:55 PM, Dave Cragg wrote:
>
> 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?
Yep. I tried it. Same results.
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list