vb打印数据库中的图片 (vb 数据库 图片)
打开宴纯图晌衫咐片-文件塌闭-打印图像-设置打印机-设置纸张大小位置等-ok,
我有试过 先把 longraw 转换成图片然后在加载到inage 不过图片大的话蛮仿返旦慢的
Private Sub writefile()
Dim iStm As ADODB.Stream
Dim strings As String
gSQL = “select PIC from iqc_masklist where Part_no=’AAA’ and pic is not null ”
Set gadoRS = gadoCN.Execute(gSQL)
If gadoRS.RecordCount > 0 Then
Set iStm = New ADODB.Stream
With iStm
.Mode = adModeReadWrite
.Type = adTypeBinary
.Open
.Write gadoRS(“备扰PIC”)
If Len(Dir$(PictBmp)) > 0 Then
Kill PictBmp
End If
.SaveToFile “D:\temp.jpg”
End With
Image1.Picture = LoadPicture(“世茄D:\temp.jpg”)
iStm.Close
End If
gadoRS.Close
End Sub
你还是借助报表工具吧
比如水晶报表 或者acticereport等等