View Single Post
  #4 (permalink)  
Old 07-09-2009, 09:48 PM
tremara1's Avatar
tremara1 tremara1 is offline
Senior Member
 
Join Date: Oct 2008
Location: Ballarat Victoria Australia
Posts: 161
Default

Code:
cmd.AddParameter("value1")
    cmd.AddParameter(
"value2")
    cmd.CommandText = 
"INSERT INTO picA VALUES (@value1,@value2)"
    con.BeginTransaction
        cmd.SetParameter(
"value1",txtId.text)
        cmd.SetParameter(
"value2",cmd.FileToBLOB(AppPath & "\abc.gif"))
        cmd.ExecuteNonQuery
    con.EndTransaction
This is the code I used to insert the image........this does the insert but the image(blob) part is not inserting properly when you look at the field in the db (sqllite expert personal a great tool) you can look at it as the hex or an image viewer. There is hex info but the image viewer shows blank. When I used the regular insert the image shows as a thumbnail when viewed in sqllite expert personal
Trev Ballarat Victoria Australia

Last edited by tremara1 : 07-09-2009 at 09:59 PM.
Reply With Quote