using System;
using System.Configuration;
using MySql.Data.MySqlClient;
public class TestDatebase
{
public TestDatebase()
{
}
public static void Main(String[] args)
{
MySqlConnection mysql = getMySqlCon();
String sqlSearch = "select * from student";
String sqlInsert = "insert into student values (12,'张三',25,'大专')";
String sqlUpdate = "update student set name='李四' where id= 3";
String sqlDel = "delete from student where id = 12";
Console.WriteLine(sqlDel);
MySqlCommand mySqlCommand = getSqlCommand(sqlDel, mysql);
mysql.Open();
getDel(mySqlCommand);
mysql.Close();
String readLine = Console.ReadLine();
}
public static MySqlConnection getMySqlCon()
{
String mysqlStr = "Database=test;Data Source=127.0.0.1;User
Id=root;Password=root;pooling=false;CharSet=utf8;port=3306";