revDatabaseColumnNamed
Björnke von Gierke
bvg at mac.com
Fri Jun 5 11:11:14 EDT 2009
On 5 Jun 2009, at 16:53, Devin Asay wrote:
> On Jun 4, 2009, at 3:38 PM, Björnke von Gierke wrote:
>>>> Can anyone tell me how to store and retrieve binary data using sql,
>>>> without it being changed in between?
>>
> <snip>
> examples omitted
> </snip>
>>
>> any other ideas?
>> Björnke
>
> Björnke,
>
...
> put "INSERT INTO soundcheck (user,data) VALUES (:1,:2)" into tQuery
> revExecuteSQL gConnID, tQuery,"tUserID","*btBits"
> put revDataFromQuery(,,gConnID,"SELECT LAST_INSERT_ID()") into
> tRecordID
> put "SELECT data FROM soundcheck where snd_id = " & tRecordID into
> tQuery
> put revQueryDatabaseBLOB(gConnID,tQuery) into tCurs
> put empty into tRecData # declare variable to receive data
> put revDatabaseColumnNamed(tCurs,"data","tRecData")
...
Thanks Devin
This looks exactly the same as one of the versions i tried.
Differences are:
you use remote mysql, i use sqlite
you use slightly different queries
you use revquerydatabaseBlob (but that's just an alias for the normal
one)
yours works, mine does'nt
so... is this maybe a bug in the sqlite driver? I'll try my code on
mysql this weekend...
thanks for the info
Björnke
--
official ChatRev page:
http://bjoernke.com/runrev/chatrev.php
Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev"
More information about the use-livecode
mailing list