DataSet ds = new DataSet();
DataBase db = new DataBase();
string sqlStr =
"select StudentPassword from Students where Sno= '"
+ textBox1.Text.Trim() + "'";
ds = db.GetDataFromDB(sqlStr);
if (ds.Tables[0].Rows[0].ItemArray[0].ToString().Trim() ==
textBox2.Text.Trim())里面的ds.Tables[0].Rows[0].ItemArray[0]是什么意思,tables[0]是第1个表的意思吧,那后面2个是什么意思呢?
DataBase db = new DataBase();
string sqlStr =
"select StudentPassword from Students where Sno= '"
+ textBox1.Text.Trim() + "'";
ds = db.GetDataFromDB(sqlStr);
if (ds.Tables[0].Rows[0].ItemArray[0].ToString().Trim() ==
textBox2.Text.Trim())里面的ds.Tables[0].Rows[0].ItemArray[0]是什么意思,tables[0]是第1个表的意思吧,那后面2个是什么意思呢?
==>
表法将第0个表中的第0行的值,转成数组的形式