revDatabaseColumnNamed

Mark Stuart mstuart at adaptcrm.com
Thu Jun 4 15:41:24 EDT 2009


Written by Björnke von Gierke on Thu Jun 4, 2009 - 09:32 AM CDT

>>>
Can anyone tell me how to store and retrieve binary data using sql,  
without it being changed in between?
thanks
Björnke
<<<

Hi Björnke,

Check out the Rev Dictionary for revDatafromQuery:
====
local tImageData
put the text of image "MyImage" into tImageData
get revDataFromQuery(, , myID, "SELECT size FROM images WHERE imagedata = :1", "*btImageData")

You can also use the name of a numerically indexed array, instead of a list of variable names. In this case, the elements of the array are substituted for the corresponding placeholders. To pass binary data in an array element, prepend "*b" to the element's value.

local tImageDataArray
put "*b" & the text of image "MyImage" into tImageDataArray[1]
get revDataFromQuery(, , myId, "SELECT size FROM images WHERE imagedata = :1", "tImageDataArray")
====

HTH u,
Mark Stuart
Email has been scanned for viruses by Altman Technologies' email management service - www.altman.co.uk/emailsystems


More information about the use-livecode mailing list