|
-
Oct 4th, 2014, 10:02 PM
#6
Re: How do I add MySql reference?
 Originally Posted by therehere3
I keep trying to do this:
Program -> Add Reference -> .NET -> MySQL.Data
and Click ok and it's still giving me the unidentified error for these:
MySqlConnection
MySqlCommand
MySqlDataReader
Adding a reference to an assembly gives you access to the types defined in that assembly. You still have to name them properly though. The fully qualified names are MySql.Data.MySqlClient.MySqlConnection, MySql.Data.MySqlClient.MySqlCommand and MySql.Data.MySqlClient.MySqlDataReader. Like all types, you have to either use their fully qualified names or else import the namespace that they're a member of, i.e. MySql.Data.MySqlClient. You can import the namespace at the file level or at the project level, on the same References page of the project properties that manages references.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|