Solved

How to access MYSQL database using  C#

Posted on 2010-08-24
7
504 Views
Last Modified: 2013-12-17
What´s the better way to access MYSQL databes using c# (2008-Visual Studio) for web application?
0
Comment
Question by:Jose Bredariol
[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
7 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 100 total points
ID: 33510153
0
 
LVL 20

Assisted Solution

by:alainbryden
alainbryden earned 50 total points
ID: 33510165
You should first try using the ODBC driver.

Details for connecting to MYSQL in C# using ODBC can be found here: http://www.geekpedia.com/tutorial139_Connecting-to-MySQL-with-Csharp-and-ODBC.html

--
Alain
0
 
LVL 5

Assisted Solution

by:Akin Delu
Akin Delu earned 50 total points
ID: 33510677
i will advice you go for MySQL-ConnectorNet as sedqwick said,
ODBC adds an extra layer to the execution and the execution would be slow.
ODBC does not releasing the connections immediately after object disposition.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 50 total points
ID: 33510688
You can install MYSQL ODBC Driver for .NET.

After that you can specify the connection string in web.config, here is an example...

<connectionStrings>      
    <add name="MySQLConnectionString" connectionString="Driver={MySQL ODBC 3.51 Driver};uid=<Username>;password=<password>;Server=<ServerName, It can be 'localhost'>;Option=16834;Database=<Database Name>;"/>
  </connectionStrings>
0
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 100 total points
ID: 33510698
you can download the MYSQL to .NET connector here: http://dev.mysql.com/downloads/connector/net/
0
 
LVL 14

Expert Comment

by:systan
ID: 33510903
0
 

Author Closing Comment

by:Jose Bredariol
ID: 33544812
Thanks All
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
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…

696 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