We are trying to migrate from System.Data.OracleClient to the Managed ODP.NET (184.108.40.20631211) data provider. The main issue that we are having at the moment is we are unable to load the default column values from the database. With System.Data.OracleClient this happened when calling OracleDataAdapter.FillSche
ma(). Unfortunately, it doesn't appear that Oracle implemented the logic the same as Microsoft and I can find much information on possible workarounds.
For my purposes I believe that if I manually set the default value on the column that my problem will be solved. I was considering running the following schema query:
SELECT TABLE_NAME, COLUMN_NAME, DATA_DEFAULT
WHERE data_default IS NOT NULL AND TABLE_NAME = 'MY_TABLE'
My issue is that I am not sure how I can easily take the value that I get from the query and convert it to the value that should be used to set the default column value in all cases. Can anyone help point me in the right direction?