ASP中的System.NullReferenceException:
问天何必 2007-05-24 09:56:31 SqlDataAdapter.Fill出错。程序如下:
SqlConnection con=new SqlConnection("server=localhost;database=vodsql;uid=sa;pwd=sa");
SqlDataAdapter da=new SqlDataAdapter("select * from fis",con);
DataSet ds=new DataSet();
da.Fill(ds,"fis");
his.DataList1.DataSource=ds.Tables["fis"];
this.DataBind();
调试的时候connection的状态是Close......
同一段程序拿到另一台机器上能成功运行。
这台机器装的XPsp2英文版,vs2003,IIS6.0; sqlserver2000 Enterprise ver
补丁全打上了.还是有时打不开数据库连接。有时重启电脑后又OK
谁能帮帮我。整了几个小时了.