Click here to Skip to main content
15,886,542 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a project that use pdf, client must can read the pdf in database server.. or can i upload just string (the directory of pdf) to database in computer server, then client just read the directory in the database, but how?

What I have tried:

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
Posted
Updated 18-Jun-19 22:05pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900