日期:2014-05-17 浏览次数:20740 次
string ConStr = "Data Source=Data Source=925XP-20120712U\\AA;Integrated Security=True;Initial Catalog=db_09;User ID=AA;Pwd=";
SqlConnection con = new SqlConnection(ConStr);
string SqlStr = "select * from 帐单";
SqlDataAdapter ada = new SqlDataAdapter(SqlStr, con);
DataSet ds = new DataSet();
ada.Fill(ds);
this.dataGridView1.DataSource = ds.Tables[0].DefaultView;