码迷,mamicode.com
首页 > 数据库 > 详细

C# SqlDataReader

时间:2019-10-30 13:51:31      阅读:73      评论:0      收藏:0      [点我收藏+]

标签:code   tostring   close   erro   cti   help   nbsp   cut   span   

            var reader = MSSQLHelper.ExecuteReader(sb.ToString(), out erro, ConnectionString);
            //SqlDataReader
            // 判断数据是否读到尾. 
            while (reader.Read())
            {
                var t1 = reader[0];
                var t2 = reader[1];
            }
            // 一定要关闭 reader 对象. 
            reader.Close();

 

C# SqlDataReader

标签:code   tostring   close   erro   cti   help   nbsp   cut   span   

原文地址:https://www.cnblogs.com/enych/p/11764039.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!