In .Net, is there any way to determine whether the ambient transaction is DTC transaction or not when debugging. I investigated SqlConnection class members but I found nothing.
thanks.
...
In our database layer object, we have always managed transactions with "START TRANSACTION", "ROLLBACK" and "COMMIT" SQL statements executed via mysqli::query.
Doing some research today, I discovered this mention in the MySQL Manual regarding using API level calls to manage a transaction VS using straight SQL:
Important
Many API...
There's an app that starts a transaction on SQL Server 2008 and moves some data around. Then, while the transaction is still not committed, the app prints out some labels. It is very important that the transaction is not committed until printing succeeded; if a printing error occurs, everything is rolled back.
Now, the printing engine i...
I'm using SQL Server 2005 for the first time, having mostly worked with MySQL in the past. I'm used to using auto_increment to create unique IDs in tables.
Anyway... I'm working in a java app, and need to do the following. Presume my table has two columns: itemID (int) and itemValue(int).
This is basically what I want to do (the dbco...
I've got a web application, one of whose functions is which is constantly appending rows to a large table. The rows look approximately like this:
id bigint not null primary key
visited datetime not null
ip_address
# Other fields
It's a tracking table, as you've probably guessed. The use of this table
is completely append-only, that i...
It is possible to use the Spring Framework's @Transactional support outside of a Spring container. In reference documentation is chapter about AspectJ aspect. I'm trying to use it in my wicket application, but with no positive result.
application-context.xml:
<tx:annotation-driven transaction-manager="trans...
Lets say I open a transaction and run update queries.
BEGIN TRANSACTION
UPDATE x SET y = z WHERE w = v
The query returns successfully and the transaction stays open deliberately for a period of time before I decide to commit.
While I'm sitting on the transaction is it ever possible the MSSQL deadlock machinary would be able to preemp...
I have a validate_uniqueness_of :field inside my ActiveRecord model. When i do a single create/update it works nicely but i have to do some large batch creation from csv files inside a Transaction
When i am in the transaction the validate_uniqueness_of does not detect the error and the model is saved!
...
I'm looking for generic code pattern to properly handle transaction with respect to possible exception. I assume there is common code pattern for that, no matter what concrete kind of transaction we are dealing with.
I have a method that executes something in transaction and want to rethrow Exception that may occur when inside transacti...
Hi !
I'm trying to create integration tests for a legacy application deployed on Weblogic 8.1 using a subclass of AbstractTransactionalJUnit4SpringContextTests.
My test method has the following annotations :
@Test
@Rollback(true)
public void testDeployedEJBCall throws Exception {...}
My test class also references beans of type org.s...
We are doing an import process from a source database to a destination database. We need to run these imports frequently in an automated fashion.
The source is on a separate server than the destination. Both are MS SQL 2008. We access the source using Linq2SQL and the destination using a custom Data Layer. We do not ever modify th...
Hello!
I want that when I execute a query for example DELETE FROM Contact, and an error is raised during the transaction it should delete the rows that are able to be deleted raising all the relevant errors for the rows that cannot be deleted.
...
I'm trying to get transactions working within a Grails service, but I'm not getting the results I'm expecting. Can someone tell me if I'm doing something wrong, if my assumptions are off?
My domain class:
class Account {
static constraints = {
balance(min: 0.00)
}
String companyName
BigDecimal balance = 0.00
Boolean...
I'm interested in the side effects and potential problems of the following pattern:
CREATE PROCEDURE [Name]
AS
BEGIN
BEGIN TRANSACTION
BEGIN TRY
[...Perform work, call nested procedures...]
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
RAISERROR [rethrow caught error using @ErrorNumber, @ErrorMessage, ...
Ok, I know nhibernate supports ambient transactions, because nhibernate sessions enlists in the ambient transactions while inside a transaction scope. However, there are some oddities, consider the following test:
[Test]
public void Transaction_RollsBackTransactionInsideOfAmbientTransaction_AmbientTransactionAborted()
{
...
Is there any way transactions can be implemented in .Net web services ?. Is it possible ?
...
Given:
mysql_query("START TRANSACTION");
mysql_query("UPDATE foo = 'bar'");
die();
die() stops the transaction before I can COMMIT or ROLLBACK. Looking at my tables, it appears that the update doesn't take place, but if I run queries later in another script, are they still part of that initial transaction? Is the transaction still 'op...
I'm using an object/relational mapper to talk to the database. The library in my case is iBatis which is also used for transaction management.
However, I recently had a case where iBatis didn't actually start a transaction even though startTransaction() etc. was called as documented.
After some debugging I found out that there was a conf...
I am using InterBase and FireBird SQL in C# .net Enviroment.
I would Like to use Transaction Scope in my program.
How to do that Effectively with InterBase-FireBird ?
Any Idea ?
...
I'm porting a class from plain JDBC to use Spring. Part of this class consists of a block that find the most recent row, updates a field, and selects it into an object to be processed later. This block should only be executed by one thread on one machine at a time to make sure no two threads process the same row. We've been handling mu...