I have stored a Image in my sql server database and when i am tring to retrive the data the following error is coming..
(Conversion from string " 8901.jpg " to type 'Boolean' is not valid.)
In the database and also in the \\Debug\member file that .jpeg files are showing.. still i am getting the error.
I saw all the threads regarding Image retriving but it could not help me..
table name = employeeDtls
Field -- A_IMG nvarchar(10)
My code Is..
Public Sub ASSING(ByVal k As String)
str = Application.StartupPath & "\members\"
conn = GetConnect()
Dim cmd As New SqlCommand("select * from EmployeeDtls where StaffNo='" & k & "'", conn)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
If dr.Read Then
If IsDBNull(dr.Item("A_IMG")) Then
Picimage.Image = Nothing
k = dr.Item("A_IMG")
Picimage.Image = Image.FromFile(str, k)