DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Returning a connection object from MTS

  1. #1
    harvey Guest

    Returning a connection object from MTS


    I have a component that acts like a connection factory. It returns a live
    connection object. If I try to use connection.execute no problem. If I
    try to do something like set recordset.activeconnection = connection I get
    an error stating bad parameters or conflicting parameters. The component
    runs in an MTS package and returns the connections outside of MTS. If I
    take the component out of MTS the problem goes away. Any help would be appreciatted.

    Harv

  2. #2
    Stefan Frutiger Guest

    Re: Returning a connection object from MTS

    Hi Harv,

    I do not response any technical stuff, but I wanna ask you why do you want
    to return a connection object?

    Idea of the 3tier architecture:
    The MTS (middle tier) should hide the database (location)!
    --> So the client doesn't matter from which DB to get the data!
    Normally, you should work with disconnected recordsets (Set
    ..ActiveConnection = Nothing)
    and client side cursors.

    Additional:
    You have to understand what happens inside the transaction on the server.
    Any objects that are created inside the transaction can't be used outside!
    MTX builds an environment which can rollback/commit any changes inside that
    transaction.
    So after you call .SetAbort or .SetComplete, don't use the objects anymore.
    Set them to Nothing instead!

    I hope this is helping you to understand a little how MTS works...
    (See some books like: MTS programming with MTS from Scot Hillier (Sams))

    Regards
    Stefan


    "harvey" <harvey@gratz.com> wrote in message
    news:3a1caf8d$1@news.devx.com...
    >
    > I have a component that acts like a connection factory. It returns a live
    > connection object. If I try to use connection.execute no problem. If I
    > try to do something like set recordset.activeconnection = connection I get
    > an error stating bad parameters or conflicting parameters. The component
    > runs in an MTS package and returns the connections outside of MTS. If I
    > take the component out of MTS the problem goes away. Any help would be

    appreciatted.
    >
    > Harv




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center