DataSet dataSet = new DataSet();
OracleCommand sqlCommand = new OracleCommand();
if (_sqlConnection.State != ConnectionState.Open)
{
_sqlConnection.Open();
}
sqlCommand.Connection = _sqlConnection;
sqlCommand.CommandText = "select * from "+ tablename;
OracleDataAdapter sqlDataAdapter = new OracleDataAdapter(sqlCommand);
if (tableName == string.Empty)
sqlDataAdapter.Fill(dataSet);
else
sqlDataAdapter.Fill(dataSet, tableName);
DataTable dt=dataSet.Tables[0].Copy();//从数据库中取得
for(int i=0;i
this.GridView1.DataSource = ds.Tables["User_Table"];
this.GridView1.DataBind();
你还没有完全把数据绑定上去!
DataTable dt=...//从数据库中取得
for(int i=0;i