今天連接MYSQL數據庫 顯示的數據量比數據庫少,跟蹤發現是MYSQL的允許的時間格式和MSSQL不一樣
MySqlConnection myconn = new MySqlConnection(
"server=192.168.1.99;uid=php;pwd=enamephp;database=db_ename;
Charset=utf8;Allow Zero Datetime=True");
myconn.Open();
MySqlCommand myNamecmd = new MySqlCommand("set names utf8", myconn);
myNamecmd.ExecuteNonQuery();
Charset=utf8;Allow Zero Datetime=True//設置連接編碼:UTF8,後面這個是對時間的設置
參考來源:http://jackyxfl.blog.163.com/blog/static/1641341502010112035859224/