8
我有下面的代碼,我想遍歷這個查詢結果中的所有字段並填充名爲字段的字典。我如何循環遍歷OracleDataReader的所有列
鑑於一個datareader是可能的嗎?
OracleCommand command = connection.CreateCommand();
string sql = "Select * from MYTABLE where ID = " + id;
command.CommandText = sql;
Dictionary<string, string> fields = new Dictionary<string, string>();
OracleDataReader reader = command.ExecuteReader();