I have two stored procedures that I want execute wrapped in a transaction. For various reasons, I need to handle the transaction in my application code instead of within the database.
At the moment, my code looks like this:
try
{
using (SqlConnection conn = Connection())
{
conn.Open();
using (SqlTransaction sq...
I am using Two SQL Server connection object in my C# console application project. I need to do this in single transaction So I used Transactionscope (Distributed Transaction)
I am not able to use the connection within the transactionscope It is displaying the error
MSDTC on server is unavailable.
How can I solve.... Both the one sql...
When processing a batch of records, if any of them fail business rule validations the entire set of inserted data is rolled back for data integrity. During this process I need to log such errors to a table in the database - which shouldnt be rolled back when the overall transaction is.
What is the best way to do this in SSIS? Different...
Is there any way to run some code after transaction commit in Django?
I need to send some messages to a rabbitmq server for offline processing, but the message gets to the consumer before the Django transaction is commited.
My message is sent in the post_save signal of the model. What I'm looking for is a similar mechanism, using sign...
I'm new to Guice, and I'm working it in to an application with a large amount of legacy code. It has several classes that look like this:
public final class DataAccessClass {
private Transaction txn;
@Inject //This was just added
public DataAccessClass(/* injectable parameters */, Transaction txn) {
this.txn = tx...
I have a .NET project (Test project) in VS2008 and am doing some unit tests for the data in DB2. I am finding that the tests are not transactional and I have to phyiscally go and delete the data or run a function to clean the data before I run the test even though I am using ITransaction. Can any one point why?
...
Hi.
I'm having a problem with deadlock on SELECT/UPDATE on SQL Server 2008.
I read answers from this thread: http://stackoverflow.com/questions/661908/sql-server-deadlocks-between-select-update-or-multiple-selects but I still don't understand why I get deadlock.
I have recreated the situation in the following testcase.
I have a table:...
I have a very simple question about transactions. (in sql server 2000, but i guess it applies to general db. transactions).
tblPrimaryKey
PkId
-----
1
2
3
tblForeignKey
Id ForeignKey
---- -----
1 1
2 2
3 3
4 1
I have 2 tables, one referencing the other (tblForeingKey.ForeignKey references tblPrimaryKey.Pk...
I normally use fully-explicit transactions in my stored procs (BEGIN TRANSACTION .... COMMIT). I just ran across an old one that instead uses "CHECKPOINT" at certain places in the code.
This won't do the same thing, right?? Even if the database is in simple mode, the whole thing will still run as one big transaction, even with a bunch o...
I've a feeling this might not be possible, but here goes...
I've got a table that has an insert trigger on it. When data is inserted into this table the trigger fires and parses a long varbinary column. This trigger performs some operations on the binary data and writes several entries into a second table.
What I have recently discover...
I am doing a few operation in linq2sql that needs to be run in a transaction. However, some of the methods I use inside of the transaction also uses linq2sql and runs inside a transaction of their own (the inner transaction is run within a stored procedure). This gives me the exception
[TransactionInDoubtException: The transaction is in...
I'm building a web app that attempts to install/upgrade the database on App_Start.
Part of the installation procedure is to ensure that the database has the asp.net features installed. For this I am using the System.Web.Management.SqlServices object.
My intention is to do all the database work within an SQL transaction and if any of it ...
Well could someone provide a really simple (but not simpler than possible) explanation of transaction as applied to computing (even if copied from Wikipedia)?
...
Recently this question was posted about the definition of what a transaction is in a general context. A common answer to this question was that a transaction should be an atomic unit of work
My question relates to this atomicity (i think) I often see explicit calls to ROLLBACK in SQL stored procedures.
Is it generally a common require...
Old VB6 Code that needs to be converted:
'DB Connection
Set Conn = New ADODB.Connection
Conn.ConnectionString = sConn
Conn.Open sConn
Conn.BeginTrans
'Recordset
Set rsPrice = New ADODB.Recordset
rsPrice.CursorLocation = adUseClient
rsPrice.CursorType = adOpenKeyset
rsPrice.LockType = adLockBatchOptimistic
rsPrice.ActiveConnection = Con...
anyone know what is the command to check un-commited transaction?
...
HI All,
I am trying to save name, address, email information using Hibernate...sometimes there is an exception thrown by Hibernate, this causes JBoss to rollback the full transaction! I do not want this to happen, if there is a Hibernate exception while saving email... then I just want the email bit to rollback not the entire, name, add...
The underlying question to this post is "Why would a non-promoted LTM Transaction ever be in doubt?"
I'm getting System.Transactions.TransactionInDoubtException and i can't explain why. Unfortunately i cannot reproduce this issue but according to trace files it does happen. I am using SQL 2005, connecting to one database and using one ...
Dear All:
Hi! These last two weeks have been my first experience with Castle ActiveRecord, and with the ActiveRecord pattern in general. I'm working on a large system that uses it frequently, and I have been finding some strange SQL transaction issues (such as the one below) as I work on it. I'll give a simplified version of the one ...
Is there any way to share same transaction between two threads in a django-based code?
The problem is that I have 1.1's TestCase (those that wrap individual tests into transactions) that are intended to test code that is running in a different thread [a sort of asynchronous testing]. So these test create some data that is intended to be...