public SQLsource()
{
string connString = System.Configuration.ConfigurationSettings.AppSettings.Get("ConnString");
            connString = "Data Source=10.0.0.235;Initial Catalog=科研管理;Integrated Security=True;User ID=sa;Password=hust";
            
            this.conn = new SqlConnection(connString);//这里的conn报错 VanDataSet van = new VanDataSet();
this.Adapters =new SortedList();
foreach(DataTable dt in van.Tables)
{
SqlDataAdapter adapter = new SqlDataAdapter();
SQLBuilder builder = new SQLBuilder(dt,conn);

//exception 
if(dt.TableName.ToLower() == "lasttime")
{
builder.Adapter.InsertCommand.CommandText = "update lasttime set lastmodifiedtime=@lastmodifiedtime";
} Adapters.Add(dt.TableName,builder.Adapter);
}
}

解决方案 »

  1.   

    服务器是win2003,sql2000,  sp4补丁已打。
      

  2.   

    调试的时候,会看到this.conn = new SqlConnection(connString);
    ServerVersion = “this.conn.ServerVersion”引发了“System.InvalidOperationException”类型的异常
      

  3.   

    服务器的环境是:win2003,sql2000,sp4补丁已打。