SqlDataAdapter问题
public static DataSet GetDataSet(DataSet daSearch,string []tableName,string []sqltext){
if(daSearch!=null)
{
daSearch.Clear();
}
SqlConnection conn=null;
try
{
for(int i=1;i<tableName.Length+1;i++)
{
conn = new SqlConnection(CONN_STRING);
SqlDataAdapter Adapter=new SqlDataAdapter(sqltext[i-1],conn);
SqlCommandBuilder Builder = new SqlCommandBuilder(Adapter);
Adapter.Fill(daSearch,tableName[i-1]);
}
return daSearch;
}
catch
{
conn.Close();
throw;
}
}
以上红色字怎么样能循环更改 sqlDataAdapter 的命名,