ExecuteReader(),ExecuteNonQuery(),ExecuteScalar(),ExecuteXml
ExecuteReader(),ExecuteNonQuery(),ExecuteScalar(),ExecuteXmlReader()之间的区别 主要有这么几种,cmd.ExecuteReader();cmd.ExecuteNonQuery();cmd.ExecuteScalar();cmd.ExecuteXmlReader();) 1,ExecuteReader();返回一个SqlDataReader对象或OleDbDat
c# – 使用ExecuteReader而不是ExecuteNonQuery
MySqlCommand cmd = new MySqlCommand (@”INSERT INTO Table(field) VALUES(‘somevalue’);” + “SELECT * FROM table”,cn); 这对我很好,因为我只是将这些语句传递给我的MySQL服务器. 插入时可以使用ExecuteReader()吗?更新删除? 我通常在那些上使用Execut