Asp.net Connection String for mysql database created in myphpadmin

hi, i have created a asp.net (c#) website & used MySql as the database. I choose hostgator as my hosting provider. In hostgator i created the mysql database using myphpadmin. The website is running properly. But the issue arises when i try to connect to the database. I feel there is something wrong with the connection string. Can anyone help me fix this issue. I am looking for help on what connection to used in the asp.net web config file when my database is in MySQL

Connection String:
add name="odbDbConnection" connectionString="Driver={MySQL ODBC 5.1 Driver};Server=localhost:3306;Database=TestingDB;User=TestingUser;Password=secret;Option=3;" providerName="System.Data.Odbc"

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

3 answers

Please edit your question and include the connection string that you are using now. Also add what happens, is there any error message?! Please update your question. Its impossible to answer it right now. Thanks!

Hi Richard, i have updated my question with the connection string & the error message that i am getting... thanks in advance :)

This error does not say much and it's most likely not related to an invalid connection.

Please post some code where the error occurs!