如题。

解决方案 »

  1.   


    string str = "Server=.;User=sa;PWD=000;DataBase=test";
                SqlConnection conn = new SqlConnection(str);
                SqlDataAdapter pos = new SqlDataAdapter("select * from stress", conn);
                DataSet dspos = new DataSet();
                pos.Fill(dspos, "tables");
                this.dataGridView1.DataSource = dspos.Tables["tables"];
      

  2.   

    "Server=.;Database=Test;Integrated Security=true" 这样看看.