you cannot use parameters that way, they are only valid as values/where clause, but you cannot use them as column names/table namesin your case, it is probably easier to dostring StrSql_1 = String.Format("select {0} as a, {1} as b from {2}", row["FCol_name"], row["FCol_name_dis"],row["FTab_name"] );SqlDataAdapter myCommand_1 = new SqlDataAdapter(StrSql_1,Conn);
DataSet ds_1 = new DataSet();myCommand_1.Fill(ds_1,"FTab");
DataTable dt_1 = ds_1.Tables["FTab"];
DataSet ds_1 = new DataSet();myCommand_1.Fill(ds_1,"FTab");
DataTable dt_1 = ds_1.Tables["FTab"];
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货