[Gambas-user] Update statement on Blob in SQLite3 database table
Алексей Беспалов
bespalov.av at ...626...
Wed Mar 14 11:12:54 CET 2012
My code for simple:
Dim sql As String
Dim ImageBlob As String
Dim ResultImg As Result
ImageBlob = File.Load(sFile)
Conn = Connections["Connection1"]
This code works:
ResultImg = Conn.Create("images_test")
ResultImg["dirname"] = sFile
ResultImg["image"] = ImageBlob
ResultImg.Update()
This code not works. I dont know why.
sql = "INSERT INTO images_test (dirname, image) VALUES(&1, &2)"
sql = Conn.Subst(sql, sFile, ImageBlob)
Conn.Exec(sql)
14 марта 2012 г. 17:06 пользователь Алексей Беспалов
<bespalov.av at ...626...>написал:
> img.Save(tempFile)
>
> newPicture["thumb"] = File.Load(tempFile)
>
>
> 2012/3/14 John Rose <john.aaron.rose at ...626...>
>
>> How do I set a Blob field in an SQLite3 database's table to an image
>> value (of a photo's jpg file) held in an Image variable using an SQL
>> update statement?
>>
>> Code would be something like:
>> Dim img As Image 'Holds photo
>> Dim sql As String
>> sql = "Update t1 Set img = ????? Where ....."
>> dbConnection.Exec(sql)
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> 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