what am i doing wrong
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
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