Solved

Error MySql.Data.MySqlClient.MySqlConnection is not defined

Posted on 2011-03-15
3
486 Views
Last Modified: 2012-05-11
Hi,

I am trying to upgrade my connection from ODBC to MySql Connector/NET and I am getting this error message:

MySql.Data.MySqlClient.MySqlConnection is not defined

I have added the name space so i am confused by this error.

Could it be that I have an older version of IIS and this namespace is not on my developemnt PC?

Thanks
0
Comment
Question by:j-w-thomas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 35137752
Did you add a reference to the dll ?
Did you add the using or import-statement on top of your class, page, ...

The steps that you need to take are as follows....

1) Install the MySql Connector
2) Add a reference to the MySql.Data.dll in your project
3) Add either a using or Import Statement to your code
4) From there you should be able to reference the MySql objects.

0
 
LVL 3

Author Comment

by:j-w-thomas
ID: 35137813
step

1) done
2) not sure how to do that. I did not do that for the ODBC version, can you help?
3) I added the import on the page and in the config file

can you help with the .dll reference?
0
 
LVL 3

Author Comment

by:j-w-thomas
ID: 35137914
Actually i think that i have got it, I added a bin folder to my app and added the MySql.Data.dll file to it.

I was also looking on this website for help too.

http://www.15seconds.com/issue/050407.htm

Thanks Dhaest!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question