|
-
Jul 6th, 2007, 06:36 PM
#1
Thread Starter
PowerPoster
-
Jul 6th, 2007, 08:10 PM
#2
Re: Connect to MySQL with C#
If you go back to www.connectionstrings.com and click on the MySQL link you'll see connection string formats for various ADO.NET providers. There is one named "Connector/NET" and I would recommend using that. It is a free, MySQL-specific provider available from the MySQL Web site and there's a link to the download under the connection string format at www.connectionstrings.com. You download and install that, then add a reference to your project. You can then use it as you would any other ADO.NET provider that comes with the Framework.
-
Jul 6th, 2007, 08:18 PM
#3
Thread Starter
PowerPoster
Re: Connect to MySQL with C#
Are you talking about MySQLDirect.Net? That is the only one I could find on there. It says it is a free for 30 days then you have to register or something..
Hrmm
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jul 6th, 2007, 08:48 PM
#4
Re: Connect to MySQL with C#
-
Jul 7th, 2007, 01:39 AM
#5
Thread Starter
PowerPoster
Re: Connect to MySQL with C#
"NOTE: By downloading the software from this page, you acknowledge that the software available from here is licensed under the GPL. We advise that you review the GPL before downloading.
If you need commercial, non-GPL, licenses, you can order them online."
This is going to be a commercial app. Isn't there something I can use that is built into VS2005 that I don't have to buy a license for?
arg...
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jul 7th, 2007, 07:26 PM
#6
Thread Starter
PowerPoster
Re: Connect to MySQL with C#
Ok, so I assume that I have to use a 3rd party driver to do this right? And I have to pay hundreds of dollars to connect to a MySQL DB?
I have my code working with the driver specified above..but you would think VS2005 would come with a driver that does it for free....As in pre-paid, by buying the VS software.
I am seriously unhappy about this....
Thanks for pointing me in the right direction anyway.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jul 8th, 2007, 10:43 PM
#7
Re: Connect to MySQL with C#
Microsoft cannot be held responsible for providing an ADO.NET connector specifically for every possible database. You can connect to any OLEDB data source using System.Data.OleDb, but I'm not sure that MySQL have an OLEDB provider any more. You can connect to any ODBC data source using System.Data.Odbc. If you can acquire an ODBC driver for MySQL then you can use that.
-
Jul 9th, 2007, 11:59 AM
#8
Hyperactive Member
Re: Connect to MySQL with C#
if you're using MySql 5.0, simply download the MySql Connector net 5.0.7 which is available on MySql site for free.
After simply build a class to do you reading and writing operations.
After installing the connector, you simply need to add the reference to the following DLL: MySql.Data.dll
In your program, you need to have the following header: using MySql.Data.MySqlClient;
And after that, everything else is simple. Use the MySqlCommand and MySqlDataReader objects to build your class and then reuse it repeatedly.
Hope this helps,
Jennifer.
P.S. from ontop of my head, I bellieve the driver for MySql is open-source.
-
Jul 9th, 2007, 10:29 PM
#9
Thread Starter
PowerPoster
Re: Connect to MySQL with C#
Thanks for the input guys.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

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
|