これは少し厄介かもしれませんが、OLE DBを使用してC#のMSAccessデータベースの特定の列の順序を変更しようとしています。データセット内のデータテーブルの列の順序に特定の変更をコミットするにはどうすればよいですか?それが不可能な場合、データセットを使用してデータベーステーブルの列を並べ替えるにはどうすればよいですか?
これが私が持っているもののサンプルです(C#で):
command.Connection = conn;
command.CommandText = tableName;
command.CommandType = CommandType.TableDirect;
adapter = new OleDbDataAdapter(command);
dataset = new DataSet(tableName);
adapter.Fill(dataset, tableName);
dataset.Tables[0].Columns[dataset.Tables[0].Columns.Count-1].SetOrdinal(CB_PositionCol.SelectedIndex);
dataset.Tables[0].AcceptChanges();
AcceptChangesは、DataRowsの変更のみをコミットすると信じているため、私がやりたいことには機能しないようです...
助けてくれてありがとう!