Click here to Skip to main content
15,799,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using Edraw Office Viewer to embed microsoft office in vb10. There's no problem in opening, saving, creating a new document but i want to load a document in the edraw office viewer instead of opening a dialog box and locating the document manually. I already stored the path of the document in the sql database.

Here's my code.
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    Dim com As New MySqlCommand
    Dim read As MySqlDataReader

        With com
            .Connection = connection
'this command is supposed to search the document in the database
            .CommandText = "select docname from document where docnumber = '" & TextBox1.Text & "'"
            read = .ExecuteReader
        End With

        With read
            While .Read
'loading the file in the edraw office viewer
            End While
        End With
    Catch ex As Exception
    End Try

End Sub

After clicking the button nothing happens. What am I doing wrong? Thank You for those who are willing to help me.

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