1 Reply Latest reply: Dec 22, 2010 7:20 PM by 826136 RSS

    ODP.NET with COM+

    191602
      I've searched this forum for answers but nothing seems to describe my problem exactly.

      Win2k - COM+ - VB.NET - ODP.NET

      Basically:
      I have installed ODP.NET and Oracle Services for MTS using the OraWin9204.exe download available on OTN. At least, I think I've installed everything ok: I've read things about "Oracle Services for MTS" and the "Oracle MTS Recovery Service" - are these one and the same thing or should I see 2 distinct windows services installed on the windows client?

      The reason I'm curious is because I've been testing my installation using a ServicedComponent class, marked as "requires transaction", with one method on it that's marked with the <AutoComplete()> attribute, which calls a simple stored procedure to insert a record in a table.

      The insert succeeds, but the transaction statistics view in Component Services is not affected - I'd expect the "committed" count to be incremented.

      Indeed, if I stop the MSDTC service, the insert still succeeds??? No error is reported.

      If I add a line of code to explicitly throw an exception from this method, the insert is not rolled back.

      If I remove the <AutoComplete()> attribute from the class and instead add ContextUtil.SetComplete() at the end of the method, and ContextUtil.SetAbort() in the main Catch block (i.e. the error handler), I get a COMException with the message "there is no MTS object context", thrown from the line of code that does the ContextUtil.SetComplete().

      This makes me suspect that I haven't got a complete installation of Oracle Services for MTS but I'm struggling to find any docs or info to help me verify this.

      Also, I've updated the registry settings to try and turn on tracing, but it's not generating any! These are the settings from my registry:

      [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET]
      "TraceFileName"="C:\\ODPNET.trc"
      "TraceLevel"="4"
      "TraceOption"="1"

      Please help!