using System.Configuration;
//--------------------------------------------
InitializeComponent();
var j = Properties.Settings.Default;
string jserver = j.jserver;
string jport = j.jport.ToString();
string jdbname = j.jdbname;
string jusername = j.juser;
string jpassword = j.jpassword;
StringBuilder jsb = new StringBuilder();
jsb.Append("server=" + jserver + ";");
jsb.Append("port=" + jport + ";");
jsb.Append("Database=" + jdbname + ";");
jsb.Append("Uid=" + jusername + ";");
jsb.Append("Pwd=" + jpassword + ";");
jsb.Append("CharSet=utf8;");
jsb.Append("Convert Zero Datetime=True;Use Affected Rows=true;AllowUserVariables=True;CheckParameters=False;");
string jconString = jsb.ToString();
jcon = new MySqlConnection(jconString);
ไม่มีความคิดเห็น:
แสดงความคิดเห็น