是image类型
sqlcom.Parameters.Add("@photo", SqlDbType.Image, photo.Length).Value = photo;
存储照片可以有好多种方法
方法一:把图片转换为二进制进行存储
方法二:把图片的图片的位置信息存储到数据库
............
参考代码:
public static byte[] GetPhoto(string filePath)
{
FileStream stream = new FileStream( filePath, FileMode.Open, FileAccess.Read);
BinaryReader reader = new BinaryReader(stream);
byte[] photoqq = reader.ReadBytes((int)stream.Length);
reader.Close();
stream.Close();
return photoqq;
}
温馨提示:答案为网友推荐,仅供参考