Convert the file to Byte() then use varbinary datatype in the SQL Database to store the file.
Try this:
Dim pdfBytes As Byte() = Nothing
pdfbBytes = System.IO.File.ReadAllBytes("C:/test.pdf")
- - - - - - - - - - - - - -
Dim connection As SqlConnection = Nothing
Dim command As SqlCommand = Nothing
Dim queryString As String = String.Empty
queryString = "INSERT INTO dbo.tbl_test (pdf_file) VALUES (@pdfFile)"
connection = New SqlConnection(_connectionString)
connection.Open()
command = New SqlCommand(queryString, connection)
command.Parameters.AddWithValue("pdfFile", pdfBytes )
command.ExecuteNonQuery()