OracleDataAdapter update on timestamp field - concurrency error bug RRS feed

  • Question


    I am using OracleDataAdapter to fetch and update a datatable. The table has timestamp fields with 7 subsecond digits. The update works fine until we hit a corner case as follows:


    The old value of a timestamp field has a subsecond value of zero as '17 Aug 2007 10:35:06.0000000'. The update command throws a Concurrency Exception.


    To reproduce:

    1. Create a table in oracle with timestamp field.

    2. Populate the table with timestamp field subsecond of zero.

    3. Use table adapter to populate the data table.

    4. Use the same adapter to update the table.


    I do not have a good solution. Please help.





    Friday, August 17, 2007 3:38 PM

All replies


    I don't have a solution.

    I am just confirming a somewhat similar experience.

    I've searched the net for similar reports. This is the closest I've found. 


    my sql was something to the effect:


    update foo_table set bar_column = :new_bar, update_timestamp = :new_update_ts where update_timestamp = Surpriseld_update_ts


    and old_update_ts had a subsecond precision of .000000

    the db type was a timestamp(6)

    timestamps with precision > 0 worked fine.


    (I found 3 work arounds)


    1. Switch to the ODP.NET driver

    2. Removed a trigger that was on the table

    3. Dont bind the timestamp in the update statement to a parameter, but use dynamic sql instead. 



    Tuesday, January 22, 2008 8:16 PM