Skip to content
Advertisement

How to connect to a mysql database in C# and mimic the SELECT, UPDATE and INSERT functions

How can I connect to a MySQL database in C#, and use it to UPDATE values in the database, INSERT values in the database and SELECT values from the database.

Also, is it possible to get the value of the row, and mimic this PHP in C#?

JavaScript

Advertisement

Answer

You have to download the MySql Connector/.NET.

How to connect to MySQL 5.0 using c# and mysql connector/net! lists some sample code which is quite similar to what you have:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement