I was just trying to write a tool which can port the BlogEngine blog platform posts to the famous wordpress using C#. As the wordpress is using MySql as the database I used MySqlConnection for the database connectivity. While trying to fetch a value I got the following error
“The given key was not present in the dictionary”
The reason for this error was the mysql.data.dll used was an old version. To fix this error what you will have to do is download the latest dll and use it.
1. Visit this link - https://dev.mysql.com/downloads/connector/net/
2. Select .NET &Mono
3. Click download
4. Extract the zip file and copy the mysql.data.dll to the bin folder or add a new reference using this dll
You will need to login to my oracle web account, if you do not have an account, create one for Free