我要住SQL sever 数据库中的 list 表中的 456 字段中插入一张图片,下面的代码是我拷过来的,有些地方我也不懂是什么意思,运行起来出错了.请高手帮我改改
System.Data.SqlClient.SqlConnection connect =new System.Data.SqlClient.SqlConnection();
string con = System.Configuration.ConfigurationSettings.AppSettings.Get(0);
System.Data.SqlClient.SqlCommand command=new System.Data.SqlClient.SqlCommand("insert into list values ('1a','1b',@i)",connect);private void Button1_Click(object sender, System.EventArgs e)
{
this.connect.ConnectionString=this.con;
this.connect.Open();
byte[] ib=new Byte[60000];
FileStream fs=new FileStream(@"E:\hhr.jpg",FileMode.Open ,FileAccess.Read );
fs.Read(ib,0,60000);
 this.command.Parameters.Add("@i",SqlDbType.Image,(int)fs.Length);
 this.command.Parameters["@i"].Value=ip;
this.command.ExecuteNonQuery();
this.connect.Close();
}