主题:没有查询到结果
connstr = System.Configuration.ConfigurationManager.AppSettings["connstr"];
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+connstr);
DataSet ds = new DataSet();
conn.Open();
string SQLstr = "SELECT * FROM addr WHERE Code='" + strProvince + "'";
OleDbDataAdapter OleDbDA = new OleDbDataAdapter(SQLstr, conn);
OleDbDA.Fill(ds);
conn.Close();
上面是程序的部分代码,如果没有查询到结果,会返回什么值?怎么判断?
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+connstr);
DataSet ds = new DataSet();
conn.Open();
string SQLstr = "SELECT * FROM addr WHERE Code='" + strProvince + "'";
OleDbDataAdapter OleDbDA = new OleDbDataAdapter(SQLstr, conn);
OleDbDA.Fill(ds);
conn.Close();
上面是程序的部分代码,如果没有查询到结果,会返回什么值?怎么判断?