We have a legacy application (COM +) in writing .net 2.0. This application needs to make a call to an assembly written in .net 4.0. Application .net 2.0 initiates a transaction using TransactionScope. The data persisted in the application .net 2.0 are not visible in the application .net 4.0. The TransactionScope class is being used in its simplest form, with all default values in its constructor.
When one removes the transaction, or if compiles the assembly .net 4.0 with .net 2.0 everything works perfectly.
We are using the latest version of the ODP (22.214.171.124.20). Database 10g.
Any suggestions? This communication between different versions of the framework is that possible?
Could you elaborate on the data not being visible in the application? It IS visible in the database, via sqlplus for example, just not in the app? Never? or Immediately?
The only thing that comes to mind here, and I'm not sure why .net version would matter, is sometimes folks query data immediately after it was inserted, and there can be a short delay in the data being visible due to the way 2 phase commit works, if you have a distributed transaction (which you do, even if there's only a single connection in the transaction, since your db is 10g. In 11g transactions can actually be promoted so you start with a local transaction).
Hope it helps,
The transaction is initiated in version 2.0 of the framework. When do you call the assembly 4.0 transaction is still active. Thus, the data is not visible in other tool.
'COM+ Framework 2.0
Using Trans As New TransactionScope()
'Insert value in table with id = 1
'Create instance class Test Framework 4.0
Dim Obj As Object = CreateObject("ComponentDotNET4.Test")
Public Sub MethodA()
'Getting the value that was placed in the context of .NET 2.0
'The value is not visible
'As if it had not been inserted into database
Dim Value As String = GetValueTable(1)