Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 376381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:35:37+00:00 2026-05-12T14:35:37+00:00

I have question I’m developing small application to desktop in win Forms. I’m using

  • 0

I have question I’m developing small application to desktop in win Forms. I’m using SQL CE 3.5 SP1 for the database.

When I make inserts on few tables by few methods I’m using the TansactionScope. When I use this methods alone I want to use normal Transaction from database connection.

Is there anyway to check in called method if connction to DB is now in transaction scope??

The answer to forward this information to method it’s not good in the future we will change the implementation of the SQL Ce to normal SQL and then I don’t wan’t change implementation so this is not good idea.

The solution before I was using in every mthod Transaction from ADO but it was wrong becouse outside was transactionScope which was not rollbacking this tran. SO I decided to delete all ADO transactions and then rollback was ok so I wan’t to know when I can use ADO and when not…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:35:37+00:00Added an answer on May 12, 2026 at 2:35 pm

    I’m not sure if these will work in Compact Edition 3.5, but this what other editions of SQL Server use:

    XACT_STATE() reports the transaction state of a session, indicating whether or not the session has an active transaction, and whether or not the transaction is capable of being committed. It returns three values:

    • 1, The session has an active transaction. The session can perform any actions, including writing data and committing the transaction.
    • 0, There is no transaction active for the session.
    • -1, The session has an active transaction, but an error has occurred that has caused the transaction to be classified as an uncommittable transaction. The session cannot commit the transaction or roll back to a savepoint; it can only request a full rollback of the transaction. The session cannot perform any write operations until it rolls back the transaction. The session can only perform read operations until it rolls back the transaction. After the transaction has been rolled back, the session can perform both read and write operations and can begin a new transaction.

    @@TRANCOUNT Returns the number of active transactions for the current connection.

    • 0, not in a transaction
    • 1, in a transaction
    • n, in a nested transaction

    EDIT base don OP’s comments
    Try this query:

    SELECT
        *
        FROM sys.dm_tran_session_transactions
        WHERE session_id=@@SPID
    

    or this to get more info:

    SELECT
        *
        FROM sys.dm_tran_session_transactions             s
            INNER JOIN sys.dm_tran_active_transactions    a On s.transaction_id=a.transaction_id
        WHERE s.session_id=@@SPID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 224k
  • Answers 225k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What you're looking for is read(byte[]). So you would something… May 13, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer I've found a way to do it on the C++… May 13, 2026 at 12:53 am
  • Editorial Team
    Editorial Team added an answer From the Wikipedia page: Internally, PNRP uses an architecture similar… May 13, 2026 at 12:53 am

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I have text I am displaying in SIlverlight that is coming from a CMS
I have a French site that I want to parse, but am running into
I have a JSP page retrieving data and when single or double quotes are
I am currently running into a problem where an element is coming back from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.