本文介绍了如何在数据库中加载图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

Private Sub Combo_Click()                       //display picture on combo click
sql="select ID,PICS from table1 where ID="& val(Combo) &"
Set RES = CON.Execute(sql)
Picture1.Picture = RES!PICS
End Sub

Private Sub Command_Click()                    //insert picture in table
strSQL = "insert into TABLE1(PICS)"
strSQL = strSQL + "values(" & Picture1.Picture & " ) "
strSQL = strSQL + "where ID="& val(Combo) &""
Set RES = Cn.Execute(strSQL)
Rs.Close
End Sub







现在错误是:




Now Error is that:

1.sql command is not properly ended.<br />
<br />
?strsql<br />
insert into TABLE1(PICS)values(-251326960 ) where ID = 1<br />
<br />
2.type mismatch<br />
<br />
Picture1.Picture = RES!PICS





请帮忙......... ....



Please help.............

推荐答案


sql="select ID,PICS from table1 where ID="& val(Combo ) &"



我强调的那一点不应该在那里



对于问题的第二部分,请参阅上面的micke.andersson的解决方案 - 周围有很多例子


the bit I''ve underlined should not be there

For the 2nd part of your problem see micke.andersson''s solution above - there are plenty of examples around


这篇关于如何在数据库中加载图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 17:30