vb点虐 如何读取oracle数据库中的图片
Public Sub Combo1_Click()
我们提供的服务有:成都网站建设、成都做网站、微信公众号开发、网站优化、网站认证、兴宾ssl等。为上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的兴宾网站制作公司
Dim adoCnn As ADODB.Connection
Dim rstOra As ADODB.Recordset
Dim intI As Integer
Set adoCnn = New ADODB.Connection
Set rstOra = New ADODB.Recordset
adoCnn.ConnectionString = "Provider=OraOLEDB.Oracle;User ID=dzjc;password=zlkj;Data Source=dzjc_2005;" '读blob字段要用Provider=OraOLEDB.Oracle
adoCnn.CursorLocation = adUseClient
adoCnn.Open
rstOra.CursorLocation = adUseClient
rstOra.ActiveConnection = adoCnn
rstOra.Open "SELECT zp FROM dzjc.dzjc_wfzp WHERE xh = '5'"
'Set Image1.DataSource = rstOra
Set Image1.Picture = PictureFromByteStream(rstOra.Fields("zp").Value)
End Sub
VB.NET从数据库中读取图片出现“Parameter is not valid”
Dim curSqlstr As String = "INSERT INTO Picture(picture_id, picture_area)" _
"VALUES('" (i + 1).ToString() "','@picture_area ')"
你看这句中的,'@picture_area ')",多个单引号了,被当成VARCHAR处理了.去了单引号才是变量.
vb点虐 从数据库读取图片循环显示
假如b窗体是form2,在a窗体中调用B窗体,直接dim frm as new form2,然后frm.show()就OK
分享题目:vb点虐 读取图片 vbnet读取文件内容
标题来源:http://lswzjz.com/article/ddegdoo.html