Working with Oracle Global Temporary Tables
Posted: Tue 15 Jul 2014 23:13
I am looking to implement Oracle Global Temporary Tables (GTT) for an existing application using dotConnect for Oracle product (v6.30). The GTT is setup to be transaction based versus session based.
I have proved the concept of writing a value to the GTT via a Store Procedure, updating a table (test_table), and using an update trigger on the table (test_table) to retrieve the value placed on the GTT by the Store Procedure. Of course, issuing a commit deletes the row from the GTT. So, conceptually everything works as expected.
When using the Entity Framework to perform the same actions in code:
Entities.RunStoreProcedure(“my_value”)
// Do some stuff
Entities.SaveChanges
Upon executing an Entities.SaveChanges(), I get the following execption: {"Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries."}
Is this fundamentally not possible using the EF or am I using the wrong approach in trying to implement the use of GTT with Entity Framework?
Thanks in advance.
I have proved the concept of writing a value to the GTT via a Store Procedure, updating a table (test_table), and using an update trigger on the table (test_table) to retrieve the value placed on the GTT by the Store Procedure. Of course, issuing a commit deletes the row from the GTT. So, conceptually everything works as expected.
When using the Entity Framework to perform the same actions in code:
Entities.RunStoreProcedure(“my_value”)
// Do some stuff
Entities.SaveChanges
Upon executing an Entities.SaveChanges(), I get the following execption: {"Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries."}
Is this fundamentally not possible using the EF or am I using the wrong approach in trying to implement the use of GTT with Entity Framework?
Thanks in advance.