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 connectserver() Try connection.Open() 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 AxEDOffice1.OpenWord(.Item(0)) End While connection.Close() End With Catch ex As Exception MsgBox(ex.Message) Finally connection.Dispose() End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)