Hey guys next question :(. Now I have having troubles with the IMAGE data type, can anyone provide examples on how to retrieve and update the image? I have tried the following:
Dim imgdatastream As FileStream
Dim imgdatalen As Integer
Dim imgtype As String
Dim n As Integer
imgdatastream = Pic.PostedFile.InputStream
imgdatalen = Pic.PostedFile.ContentLength
imgtype = Pic.PostedFile.ContentType
Dim imgdata() As Byte = New [Byte](imgdatalen) {}
n = imgdatastream.Read(imgdata, 0, imgdatalen)
Dim paramAvatar As SqlParameter = myCommand.Parameters.Add("@Avatar", SqlDbType.Image)
paramAvatar.Value = n
But I recieved the lovely error "
Specified cast is not valid. "
help? :(