Ara :
HOME
ASP
PHP
JAVASCRIPT
C#
Add Code
Turkish
ASP Code Samples
PHP Code Samples
JavaScript Code Samples
C# Code Samples
C# Code Sample
C# Executing MySQL Command with C#
This code provides with connecting the MySQL database and executing the SQL command.
// using MySql.Data.MySqlClient; // using System.Configuration; public static void ExecuteQuery(string sqlstr) { string db = ConfigurationManager.ConnectionStrings["MySQLConnection"].ConnectionString; using (MySqlConnection conn = new MySqlConnection(db)) { conn.Open(); MySqlCommand mycommand = new MySqlCommand(sqlstr, conn); mycommand.ExecuteNonQuery(); }
Added By : Administrator
Back to C# Code Samples
email :
info@kodornekleri.com