Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Getting error "The given key was not present in the dictionary." (no replies)

$
0
0
I am using Hostgator as my host. I'm using the .net connector 6.0.7.0 and I can't seem to get the MySqlCommand.ExecuteReader() to work. It keeps giving me the error "The given key was not present in the dictionary"

_connectionString = string.Format("server={0}; database={1}; user id={2}; password={3}; charset=utf8; pooling=false",
server,
database,
username,
password);
var conn = new MySqlConnection(_connectionString)
MySqlCommand cmd = new MySqlCommand("SELECT * FROM wp_users", conn);
MySqlDataReader reader = cmd.ExecuteReader();

Any help is greatly appreciated. I tried searching through the forums for the answer but couldn't find it.

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>