[Gambas-user] how to insert hImage into table sqlite base
Benoît Minisini
gambas at ...1...
Sun Feb 5 09:10:14 CET 2012
Le 03/02/2012 08:10, Алексей Беспалов a écrit :
> Thank you.
>
> My code:
> 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
> sql = "INSERT INTO images_test (dirname, image) VALUES(&1,&2)"
> sql = Conn.Subst(sql, sFile, ImageBlob)
> Conn.Exec(sql)
>
> Gambas is freezes.
>
Please give more details: what is your image exactly? Do you succeed in
inserting it by using the "PictureDatabase" example?
--
Benoît Minisini
More information about the User
mailing list