我正在處理與從掃描儀捕獲的圖像保存在文件夾和數據庫中有關的項目。掃描進行確定,但是當我保存在磁盤上的圖像,並在數據庫中,我得到了以下錯誤103666 vb.net用於在掃描後將圖像保存在圖像文件夾和數據庫中
DATABASE --tablename路徑 - image列 - (FILE_NAME,varchar50,空=真)(圖片,爲nvarchar(最大),空=真)
我的代碼如下:
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
檢查路徑大小是否超過50個字符。 – Harsh