Khai báo:
Properties.Settings fs = new Properties.Settings();
Cài đặt:
private void btnOk_Click(object sender, EventArgs e)
{
connectString = @"";
fs.ConnectString = connectString;
fs.Save();
}
Sử dụng:
con = new SqlConnection(Settings.Default.ConnectString);
Không có nhận xét nào:
Đăng nhận xét