what am i doing wrong

edited 7:46PM in FastReport .NET
Hi all i am trying to get my report display a mysql quierry but it is not working what am i missing thanks for the help!
Dim conn As New MySqlClient.MySqlConnection
Dim cmd As New MySqlClient.MySqlCommand
Dim myData As New DataSet
Dim myAdapter As New MySqlClient.MySqlDataAdapter
conn.ConnectionString = _
"server=xxxx;" _
& "uid=xxxx;" _
& "pwd=xxxx;" _
& "database=dnote_db"
Try
conn.Open()
cmd.CommandText = "SELECT * FROM data WHERE tpdn='9115'"
cmd.Connection = conn
myAdapter.SelectCommand = cmd

myAdapter.Fill(myData)
Report1.RegisterData(myData, "myData")
Report1.Show()
Catch ex As Exception
MessageBox.Show(ex.Message, "Report could not be created", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

Comments

  • StarkStark Syria
    edited 7:46PM
    What is the error message say ?



  • edited 7:46PM
    i dont get any error messages but it does not display my quiery

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.