MySQL .NET Connector Error

I Have a WCF webservice that uses a separate MVC assembly to form object from a database using. The MVC contains the reference to the MySQL connector but every time I try to run a query I get the following the error shown in code.. I know my connection is right because I've copy and pasted it directly form a working windows app.. Is there something new with how WCF webservices work or it a problem that I have the methods in a separate assembly?

"Key cannot be null. Parameter name: key"
Stack Track:
   at System.Collections.Hashtable.ContainsKey(Object key)
   at System.Collections.Hashtable.Contains(Object key)
   at MySql.Data.MySqlClient.MySqlPoolManager.GetPool(MySqlConnectionStringBuilder settings)
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

UmeshSenior Principal Technical Support EngineerCommented:
joshkrakAuthor Commented:
Lol, yea, this was the first one I saw, but if you look at my stack trace, the error is coming from within the managed mysql connector. My code has abosultely nothing to do with hashtables. Its a DataTable that I'm trying to fill.
UmeshSenior Principal Technical Support EngineerCommented:
Can you post your table description & insert statement?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
joshkrakAuthor Commented:

'aff_id', 'int(10) unsigned', 'NO', 'PRI', '0', ''
'delta', 'int(10) unsigned', 'NO', 'PRI', '0', ''
'aff_name', 'varchar(45)', 'YES', '', '', ''
'created', 'datetime', 'YES', '', '', ''
aff_id and delta form the primary key
I actually get this error regardless of it being a SELECT or INSERT
SELECT Statement:
SELECT * FROM affiliates WHERE aff_id=?AffId ORDER BY delta DESC LIMIT 1
The code that exectues the command (Parameters where added before hand)
                Dim Adapt As New MySqlDataAdapter(Cmd)
                Adapt.FillLoadOption = LoadOption.OverwriteChanges
                Adapt.AcceptChangesDuringFill = True
Connection string

Open in new window

joshkrakAuthor Commented:
Omg, this is embarrassing. I wasnt passing in the connectionstring when initializing the MySqlConnection :(
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.