Question how can i retrieve pdf files in sql?

Ritual

New member
Joined
Sep 28, 2022
Messages
1
Programming Experience
Beginner
pls help.
this is the code.

Private Sub Btn_view_Click(sender As Object, e As EventArgs) Handles Btn_view.Click
openCon()
Try
cmd.Connection = con
cmd.CommandText = "SELECT * FROM tbl_saln WHERE SALN_ID = " & DGV_SALN.CurrentRow.Cells(0).Value
adapter.SelectCommand = cmd
adapter.Fill(table)

With PDF
.Show()
.Focus()
.AxAcroPDF1.src = Application.StartupPath & "\HRIS_PDF\" & table.Rows(0).ItemArray("PDFNAME")
End With

Catch ex As Exception
MsgBox(ex.ToString)
Finally
adapter.Dispose()
con.Close()
End Try

End Sub
 
Please don't post unformatted code snippets as they are too hard to read. Also, you need to provide a FULL and CLEAR explanation of the problem. Don't just post your code and expect us to work it out. Explain what you're trying to achieve, how you're trying to achieve it and what happens when you try.
 
Back
Top