Jump to content
  • Advertisement
Sign in to follow this  
GekkoCube

[.net] .Net + MySQL, anyone?

This topic is 4245 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

anyone know how to get MySQl working under a .Net app? Since .Net doesn't have native support for MySQL I was thinking i could use ODBC. my MySQL database is remotely accessible on freesql.org when i attempt to open a connection i get an exception. something about odbc driver. am i trying the impossible here?

Share this post


Link to post
Share on other sites
Advertisement
This link looks good: http://dev.mysql.com/tech-resources/articles/dotnet/

(I just typed ".net MySql" into Google and that was the first result)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You might want to look in to ADO.NET if you are using .NET for this. I found a few tutorials that would connect to my local server and get some data, but decided to just buy a book on the subject.

Share this post


Link to post
Share on other sites
im about to try out that link that was posted. incidentally though, i did try that search query. i've tried many different combinations. no real luck though.

as for the ado.net, that is exactly what im using.
ado.net supports SQL, OLE, ODBC, and Oracle. MySQL is different from these, but like i said, i tried ODBC, a generic approach to generic database connections.

Share this post


Link to post
Share on other sites
"There are a number of fully managed .NET providers available to help MySQL users develop applications in the .NET environment.

Two popular choices are:

1. ByteFX.Data
2. CoreLabs"

i just downloaded CoreLabs. this is better than what i'd expected! thanks very much.

Share this post


Link to post
Share on other sites
Download the "MySQL Connector Net 1.0.7" from the MySQL website. It is what I use, and I'm finding it to be quite beginner friendly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Thevenin
Download the "MySQL Connector Net 1.0.7" from the MySQL website. It is what I use, and I'm finding it to be quite beginner friendly.


thats the way to go imho. basically its a simple library dll, you have to distribute with your app. you get the mySQL namespace with all the familiar ADO objects implemented having mySQL prefixes instead of sql/odbc/lodb/other...

Share this post


Link to post
Share on other sites
Absolutely. You should be able to use almost any database with .NET. If the database has at least an ODBC interface, you can use .NET to connect to it. ODBC is not the best choice though, as it's very generic, and has no optimizations for specific databases. It is best to use a .NET connecter for the database if it is available. There is one provided by MySQL.

Incidentally, I wrote about this a while ago. I'd suggest taking a look on my website, under ASP.NET (applies to .NET in general), for more info.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I accessed a MySQL DB from C# about 3 yrs ago. It wasn't hard but my memory is fuzzy...

I don't think MySQL had a .NET interface then. Apparently from the above posts, now it does.

When you tried ODBC and failed, I'm guessing you neglected to install MySQL's client-side ODBC driver. I believe, for any DB which supports ODBC, you have to install that DB's client-side ODBC driver for it to work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!