[Gambas-user] how to insert hImage into table sqlite base

Алексей Беспалов bespalov.av at ...626...
Fri Feb 3 08:10:30 CET 2012


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.

2012/2/3 Johny Provoost <johny.provoost at ...27...>

> you could look in the examples: PictureDatabase
> I tried it in version 2 and it worked very well.  Hope this is what you
> search for
>
> Johny
>
>
>
> Op 02-02-12 14:51, áÌÅËÓÅÊ âÅÓÐÁÌÏ× schreef:
> > Hi!
> > Tell me please, how to insert hImage into table sqlite base, into BLOB
> > field?
> >
> >
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> 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