Thanks for the reply. Please storing the pdf is not a problem but retrieving it is issue for now. Please how do I retrieve this line Me.Pic1.Image = Image.FromStream(ms) and convert it into pdf. This line of code was used to retrieve image file correctly and I used the same process to store a pdf file but the above code to retrieve is it is the problem. Thanks
Dim strQuery As String = "Select ReceiptNo,Pic1 from BPA1 where ReceiptNo=@ReceiptNo"
SQLCon1.Open()
comFile = New SqlCommand(strQuery, SQLCon1)
comFile.Parameters.AddWithValue("@ReceiptNo", Me.txtReceiptNo.Text.Trim)
daFile = New SqlDataAdapter(comFile)
daFile.Fill(taFile)
If taFile.Rows(0).Item("Pic1") IsNot DBNull.Value Then
Dim img() As Byte
img = taFile.Rows(0).Item("Pic1")
Dim ms As New MemoryStream(img)
If img.Length <> "0" Then
Me.Pic1.Image = Image.FromStream(ms)
' Me.txtPdfPath.Text = File.FromStream(ms)
Else
Me.Pic1.Image = Nothing
End If
End If