using system;
using system.configuration;
using mysql.data.mysqlclient;
///
/// testdatebase 的摘要說明
///
public class testdatebase
public static void main(string args)
///
/// 建立mysql資料庫鏈結
///
///
public static mysqlconnection getmysqlcon()
///
/// 建立執行命令語句物件
///
///
///
///
public static mysqlcommand getsqlcommand(string sql,mysqlconnection mysql)
///
/// 查詢並獲得結果集並遍歷
///
///
public static void getresultset(mysqlcommand mysqlcommand) }
} catch (exception)
finally }
///
/// 新增資料
///
///
public static void getinsert(mysqlcommand mysqlcommand)
catch (exception ex) }
///
/// 修改資料
///
///
public static void getupdate(mysqlcommand mysqlcommand)
catch (exception ex) }
///
/// 刪除資料
///
///
public static void getdel(mysqlcommand mysqlcommand)
catch (exception ex) }
}
C 連線mysql例項
using system using system.configuration using mysql.data.mysqlclient testdatebase 的摘要說明 public class testdatebase public static void main string args ...
c mysql 例項 C 連線mysql例項
usingsystem usingsystem.configuration usingmysql.data.mysqlclient testdatebase 的摘要說明 public classtestdatebase public static voidmain string args mysql...
mysql例項連線 Mysql 例項分析連線
表a記錄如下 aid anum 1 a20050111 2 a20050112 3 a20050113 4 a20050114 5 a20050115 表b記錄如下 bid bname 1 2006032401 2 2006032402 3 2006032403 4 2006032404 8 200...