public void AddPartyAsIndividual(AddAnIndividual Student)
{
using (SqlConnection con = new SqlConnection(ConnString))
{
SqlCommand cmd = new SqlCommand("AddIndividualParty", con);
cmd.CommandType = CommandType.StoredProcedure;
md.Parameters.AddWithValue("@Student_Image", STudent.StudentImage);
if (con.State == ConnectionState.Closed)
{
con.Open();
cmd.ExecuteNonQuery();
}
}
答案 0 :(得分:1)
查看以下Codeproject文章。它演示了如何通过SQL Server存储和检索图像。使用的示例是Winforms客户端,但代码可以适应任何项目类型。
Storing and Retrieving Images from SQL Server Using Strored Procedures and C#.net