SqlDataAdapter 数据适配器能做到?不用SqlCommand? 楼上解释下怎么做?
曾经有双翅膀,我没用她飞上蓝天,丢锅里炖汤了!
SqlConnection cnn = new SqlConnection("server = .; uid = sa; pwd = sqlpass; database = master");
SqlDataAdapter sda = new SqlDataAdapter("SELECT * FROM SYSDATABASES",cnn);
DataSet ds = new DataSet("SYSDATABASES");
sda.Fill(ds,"SYSDATABASES");