C#中使用存储过程返回值的问题(转)
摘要:1.存储过程返回SqlDataReader public SqlDataReader getaqiyyuy(string qiy) { SqlConnection userConnection = Connection.getConnection(); SqlCommand userCommand = new SqlCommand("MVC_getaqiyluy", userConnection); userCommand.CommandType = CommandType.StoredProcedure;//采用存储过程 userCommand.Parameters.Ad
阅读全文
posted @
2013-12-25 14:00
梦寐以求じ
阅读(366)
推荐(0)
使用SqlDataAdapter时,需要注意的几点(转)
摘要:1、SqlDataAdapter内部通过SqlDataReader获取数据,而默认情况下SqlDataReader不能获知其查询语句对应的数据库表名,所以下面的代码:string strConn,strSQL;strConn=@"DataSource=.\SQLEXPRESS;"+"Initial Catalog=Northwind;Integrated Security=True;";strSql="SELECT CustomerID,CompanyName FROM Customers";SqlDataAdapter da=new
阅读全文
posted @
2013-12-25 13:37
梦寐以求じ
阅读(319)
推荐(0)