sql链接(c#)
SqlConnection con;
SqlDataAdapter adaptcommand;
string strconnect;
string strcommand;
DataSet dataset1=new DataSet();
strconnect="Data Source=.\\sqlexpress;Initial Catalog=db_test;Integrated Security=True;Pooling=False";
strcommand="select * from dt_test";
adaptcommand=new SqlDataAdapter(strcommand,strconnect);
adaptcommand.Fill(dataset1,"data");
GridView3.DataSource = dataset1.Tables["data"];
GridView3.DataBind();