C# 存取数据库中的图像的问题
请问在 C# 存取数据库中的图像http://www.中
在构造函数中添加代码
string sqlstr="select * from pub_info";
conn=new SqlConnection(connString);
adapter=new SqlDataAdapter(sqlstr,conn);
SqlCommandBuilder builder=new SqlCommandBuilder(adapter);
adapter.UpdateCommand=builder.GetUpdateCommand();
dataset=new DataSet();
adapter.Fill(dataset,"pub_info");
//将text1Box1的Text属性绑定到dataset中的pub_info表的pr_info字段
this.textBox1.DataBindings.Add(new Binding("Text",dataset,"pub_info.pr_info"));
for(int i=0;i<dataset.Tables[0].Rows.Count;i++)
{
this.listBox1.Items.Add(dataset.Tables[0].Rows[i][0]);
}
其中adapter.UpdateCommand=builder.GetUpdateCommand();
dataset=new DataSet();
adapter.Fill(dataset,"pub_info");
接口无效是为什么呢