asp.net的ExecuteReader()方法的用法

2025-04-19 21:12:31
推荐回答(2个)
回答1:

ExecuteReader()这只是一个方法啊,SqlCommand cmd = DB.createSqlcommand("select * from denglu where id=1"); 你觉得这错没?

回答2:

SqlConnection呢?

SqlCommand cmd = new SqlCommand(sql, con);
SqlDataReader da = cmd.ExecuteReader();