SqlConnection sqlcon = new SqlConnection("连接串");
SqlDataAdapter ada = new SqlDataAdapter();
SqlCommand sqlcom = new SqlCommand("SearchResult", sqlcon);
SqlParameter sp = new SqlParameter("@Title", "传入值");
sqlcom.CommandType = CommandType.StoredProcedure;
sqlcom.Parameters.Add(sp);
ada.SelectCommand = sqlcom;
DataSet ds = new DataSet();
ada.Fill(ds);
C# 执行存储过程
最新推荐文章于 2022-06-05 17:20:47 发布