mysqldatareader

Error: select command denied to user '<userid>'@'<ip-address>' for table '<table-name>'

左心房为你撑大大i 提交于 2019-11-26 18:51:35
In my website, I am using MySQL database. I am using a webservice where in I do all my database related manipulations. Now In one of the methods of that webservice, I get the following Error. select command denied to user ''@'' for table '' What could be wrong? Below is the code where I get that error. I tried debugging and found that it fails at the line MySqlDataReader result1 = command1.ExecuteReader(); Here is my code: String addSQL = "Select Max(`TradeID`) from `jsontest`.`tbl_Positions"; MySqlConnection objMyCon = new MySqlConnection(strProvider); objMyCon.Open(); MySqlCommand command =

Using MySQLConnection in C# does not close properly

风格不统一 提交于 2019-11-26 17:49:17
问题 Final solution: The connection was added to the connection pool. So I closed it, but it still remained physically open. With the ConnectionString Parameter "Pooling=false" or the static methods MySqlConnection.ClearPool(connection) and MySqlConnection.ClearAllPools the problem can be avoided. Note that the problem was, that the connection was still alive when I closed the application. Even though I closed it. So either I don't use connection pooling at all or I clear the specific pool before

Error: select command denied to user &#39;<userid>&#39;@&#39;<ip-address>&#39; for table &#39;<table-name>&#39;

巧了我就是萌 提交于 2019-11-26 06:37:12
问题 In my website, I am using MySQL database. I am using a webservice where in I do all my database related manipulations. Now In one of the methods of that webservice, I get the following Error. select command denied to user \'\'@\'\' for table \'\' What could be wrong? Below is the code where I get that error. I tried debugging and found that it fails at the line MySqlDataReader result1 = command1.ExecuteReader(); Here is my code: String addSQL = \"Select Max(`TradeID`) from `jsontest`.`tbl