Run query NOT in transaction

From: Evgeny Ryabitskiy (evgeny.ryabitski..mail.com)
Date: Tue Oct 27 2009 - 11:54:41 EDT

  • Next message: Andrus Adamchik: "Re: Run query NOT in transaction"

    Hello 2 everyone!

    I have one problem with transaction policy in Cayenne.
    I need to run some query without transaction. Why? I am using
    Temporary Tables in T-SQL which can't be created in Transaction.
    But Cayenne using transaction for every query.

    Here is example:

    If I run this Query:

    Create Table #MYTempTable (someid int)
    Insert Into #MYTempTable (someid) Select 0

    I got:
     java.sql.SQLException: There was a transaction active when exiting
    the stored procedure '****'. The temporary table '#MYTempTable' was
    dropped in this transaction either explicitly or implicitly. This
    transaction has been aborted to prevent database corruption.

    After some research I didn't find any ability to turn off transaction
    for query. Maybe it will be nice to add some API parameter to change
    this behavior? )

    Evgeny Ryabitskiy.



    This archive was generated by hypermail 2.0.0 : Tue Oct 27 2009 - 11:55:18 EDT