con.execute "CREATE tblImg (lngId COUNTER PRIMARY KEY, binImg IMAGE)"
 
set ads=createobject("adodb.stream")
ads.type=1
ads.mode=3
ads.open
ads.loadFromFile "test.jpg"
 
 
set rst=createobject("adodb.recordset")
rst.open "tblImg",con,0,3,2
rst.addNew
ads.Position=0
rst("binImg").appendChunk ads.read()
ads.close
rst.update

posted on 2014-05-07 13:42  milantgh  阅读(663)  评论(0编辑  收藏  举报