日期:2014-05-18 浏览次数:21028 次
strSQL="Insert Hr_BaseInfo(FEmpID,FEmpNo,FEmpName) values (1,'001','张三',@Image_byte) "
string CnnStr = ClsDataOperer.GetString();
SqlConnection sqlConn = new SqlConnection(CnnStr);
sqlConn.Open();
//创建SqlCommand对象
SqlCommand command = new SqlCommand(strSQL, sqlConn);
//调用文件流方法
command.Parameters.Add("@Image_byte", SqlDbType.Image).Value = Image_byte;
//执行添加
int i = command.ExecuteNonQuery();