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
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