这就是我得到的:
'PatientDatabase.Properties.Settings'不包含'SQL'的定义,也没有扩展方法'SQL'可以找到类型'PatientDatabase.Properties.Settings'的第一个参数(你是否缺少using指令或汇编参考?)`
这是我的代码:
private void Form1_Load(object sender, EventArgs e)
{
try
{
objConnect = new DatabaseConnection();
conString = Properties.Settings.Default.patientDetailsConnectionString;
objConnect.connection_string = conString;
objConnect.sql = Properties.Settings.Default.SQL;
ds = objConnect.GetConnection;
MaxRows = ds.Tables[0].Rows.Count;
NavigateRecords();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
}