//插入一行
SqlConnection thisConnection = new SqlConnection(
"server=.;"+"integrated security=SSPI;"+ "database=MyID");
thisConnection.Open();
SqlDataAdapter thisAdapter = new SqlDataAdapter(
"SELECT User,Pwp FROM My",thisConnection);
SqlCommandBuilder thisBuilder = new SqlCommandBuilder(thisAdapter);
DataSet thisDataSet=new DataSet();
DataRow thisRow = thisDataSet.Tables["My"].NewRow();
thisRow["User"]="wain";
thisRow["Pwp"]="wain";
thisDataSet.Tables["My"].Rows.Add(thisRow);
thisAdapter.Update(thisDataSet,"My");
运行到这一行:DataRow thisRow = thisDataSet.Tables["My"].NewRow(); 出错了说是:未处理的“System.NullReferenceException”类型的异常出现在 ConsoleApplication3.exe 中。
其他信息: 未将对象引用设置到对象的实例。
谁能帮帮我啊 是按照书上的例子写的