I have googled and tried to find an solution to this issue but I have had no luck. The code is meant to retrieve a list of tickets from a ticket database that have been created by a specific user.
The image below is the error I get when I try to pull the data from the Retrieve Data function in the server explorer or run any query on the connected database. Don't know if that will help but its here now.Code:Public Shared Function LoadTickets() As DataSet 'dbhost, dbuser, dbpass are global variables that hold the server ip, username, and password rot the database Dim connstr As String = "server=" + dbHost + ";user=" + dbUser + ";database=tickets;port=3306;password=" + dbPass + ";" Dim conn As MySqlConnection = New MySqlConnection(connstr) 'user is a public var that holds the current username Dim sql As String = "SELECT * FROM `ticket_index` WHERE username='" + User + "';" Dim daTicket As MySqlDataAdapter = New MySqlDataAdapter(sql, conn) Dim cb As MySqlCommandBuilder = New MySqlCommandBuilder(daTicket) cb.DataAdapter = daTicket Dim dsTicket As DataSet = New DataSet() 'error is throw here daTicket.Fill(dsTicket, "ticket_index") Return dsTicket End Function
I am at a loss, I have tweaked this code for a while now and can't come up with a solution. I am also kind of new to working with mysql databases and mysqldataadapters so any tips or advice is acceptable too. Thanks you for your time and for looking at my code




Reply With Quote