C#OleDbDataReader thisReader =thisCommand.ExecuteReader()这是啥意思〉?求具体点的注释.写了

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 20:25:21
C#OleDbDataReader thisReader =thisCommand.ExecuteReader()这是啥意思〉?求具体点的注释.写了

C#OleDbDataReader thisReader =thisCommand.ExecuteReader()这是啥意思〉?求具体点的注释.写了
C#OleDbDataReader thisReader =thisCommand.ExecuteReader()这是啥意思〉?
求具体点的注释.写了

C#OleDbDataReader thisReader =thisCommand.ExecuteReader()这是啥意思〉?求具体点的注释.写了

这条语句的意思是,执行thisCommand对象中的sql查询命令,并返回查询结果,并将查询结果保存到thisReader 对象中,

 你可以通过下面代码读取查询的结果:

while (thisReader.Read())
        {
            //thisReader[0]  表示表中的第一列数据,[1] 表示第二列数据,依次类推
           Console.WriteLine(thisReader[0].ToString());
        }
thisReader.Close();