Sub tampilpdf() connDB() Try AxAcroPDF1.src = Nothing sql = "SELECT pdf FROM tb_mastersoal where idsoal = '" & txtidsoal.Text & "' limit 1" Dim cmd As New MySqlCommand(sql, conn) dr = cmd.ExecuteReader While dr.Read() Dim utf As New System.Text.UTF7Encoding() AxAcroPDF1.src = utf.GetString(dr.Item("pdf")) End While dr.Close() cmd.Dispose() Catch ex As Exception MessageBox.Show("There was an error: " & ex.Message, "Error", _ MessageBoxButtons.OK, MessageBoxIcon.Error) End Try conn.Close() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)