Getting error "The given key was not present in the dictionary."
Posted by: Thang Le
Date: September 02, 2015 12:05AM

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.

Options: ReplyQuote


Subject
Written By
Posted
Getting error "The given key was not present in the dictionary."
September 02, 2015 12:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.