[英]103666 vb.net for saving image in image folder and in database after scanning
我正在从事一个与将从扫描仪捕获的图像保存在文件夹和数据库中有关的项目。 扫描执行正常,但是当我将图像保存在磁盘上以及数据库中的路径时,出现以下错误
数据库-表名-图像列-(File_Name,varchar50,null = true),(Image,nvarchar(Max),null = true)
我的代码如下:
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
''SCAN THE IMAGE AND SAVE TO PROJECT FOLDER AND IN DATABASE (AS BLOB)
If True Then
' Scanner selected?
Dim device = TryCast(Devices.SelectedItem, Scanner)
If device Is Nothing Then
MessageBox.Show("Please select a device.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If
' Scan
Dim image = device.Scan()
'Save the image
'Dim path = "image/"
'If File.Exists(path) Then
' File.Delete(path)
'End If
'image.SaveFile(TextBox1.Text, "image/")
'image.save()
End If
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.