transactions

Will using a transaction eliminate the need to use secondary dataContexts to attempt sql insert/update/deletes?

So I have a list of IT/developer tickets stored in a database via Linq-To-Sql. Save attempts are only done at the user request, or if they say save on close. My concern was that a user makes a change to 2 or more tickets without saving in-between. For some reason if the database rejects the change to one, doesn't give me very much info...

SQL Express 2008 Not committing LINQ to SQL writes in sequence?

Hi, I've an event-driven app that has recently started using SQL Express 2008 (instead of Std version) in dev and test to store the current state of a state machine. After moving to SQL Express, we started seeing a discrepancy between the order in which we write to the database (using LINQ to SQL) and the order in which SQL Express Prof...

CREATE TABLE AS SELECT killing MySQL

We run a MySQL server with moderate load (200-300 QPS) on quite powerful hardware (HP DL360 with 8 Xeon cores, 8Gb RAM and RAID10). All the tables are innodb and the active dataset fits within the allocated innodb_buffer_pool_size. Our database is normalized and to reduce the number of joins we use materialized views to flatten the data...

Performance in PDO / PHP / MySQL: transaction versus direct execution

I am looping through a number of values (1 to 100 for example) and executing a prepared statement inside the loop. Is there and advantage to using a transaction - committing after the loop ends - compared to a direct execution inside the loop? The values are not dependant on each other so a transaction is not needed from that point of ...

Best practices for taking and storing credit card information with PHP

Should I use sessions for the first few steps (validation, review purchase) then input the information into the database in the final submit? Could the cookies get jacked and transform into a lawsuit? Is it too risky? Would I need to protect my db any special way if storing credit card numbers? Any and all recommendation and personal ...

Auto rollback when executing SQL queries from C#

Hello, I have a problem with some SQL queries that are wrapped inside a transaction. Here's how the code looks like: using (SqlTransaction dbTrans = conn.BeginTransaction()) { using (SqlCommand cmd = conn.CreateCommand()) { for(Parameters p in parameterList) try { //execute insert commmand } catch { //log...

Transaction across WCF and REST

We are having a business logic which involves call to services. The application is built in c#.net and the business logic needs to make a call to the fallowing 1)Internal database call to update few fields 2)call to REST WCF service to store a document 3)call to web service to store data in queue I want the above 3 steps to be Transa...

ssis transaction support with ms access

Is it basically possible to do transactions with ssis and ms access 97! I have tried setting up a complicated package which doesn't work and then tried some transactions with a simple package which worked no problem with sql server to check I understood the principles. Now the question is does ms access support or does ssis support trans...

Best way to manage transactions

I've the JBoss and Hibernate based system. And I need to process two long operations. Operations can be probably longer than transaction's timeout. It operations are persists many-many entities, in two different transactions. And if something goes wrong, during this operations, I should rollback all changes of the transactions. What's ...

Transactions scope in WCF

I need to make call to a WCF service in a Transaction scope. I have never tried transactions in WCF serivce. Does anyone have experience in similar requirement? ...

mysql error: Lock wait timeout exceeded

I'm using mysql together with asp.net on my webserver. I also use a sqlite database to be able to use the database on another device. I need to send data between the two databases. This is something that needs to be done many times a day. This is an example of how I do it: using (MySqlTransaction mysqltransaction = mysqlconn.BeginTr...

Management Studio 2005: Will Cancelling a Statement trigger a Rollback?

A few minutes ago, while working out a new sproc, I executed the wrong delete statement. Something like this: Delete From SomeTable Where SomeStatusID=1 10 seconds into it, I realized that I typed in the wrong status and hit cancel. It said that the statement was canceled. I did a restore to a separate database to get back the table ...

Transaction across DAL operations + a web service call + logging

I've already looked here and found some great advice on managing transactions. My problem is that I'm also calling a web service in at least one case, logging to a database table. Here's some psuedo-code that might help make things more clear: customer = batchRefundToProcess.RefundCustomer; //Validate everything ...

Perform multiple LINQ updates to avoid uniquekey exception

Hi, I have a database with a Unique key on the the columns ParentRef and SortIndex. In LINQ, I want to switch two SortIndex values. I want to do this in one transaction so there can be multiple users at once. How do I, with LINQ, switch the values in one go, so my Unique key does not be violated? var dc = new MyDataContext(); ...

Linq2SQL: SubmitChanges covered by a transaction?

MyDataContext context = new MyDataContext(); // do a lot of insert, deletes and updates context.SubmitChanges(); Will all SQL genereated and executed by SubmitChanged() be covered by a transaction? How do I make sure it's covered by a transaction? Updated: The reason why I asking it that I having a weird bug where I suspect a trans...

Credit card payment gateway in PHP?

I need to process credit cards and integrate with backend payment services to credit them. The majority of solutions on the internet require an intermediary, eg. 2CO, GCO, Auth.net. Do you have any experience with implementing a credit-card payment gateway in PHP? Any help in appreciated. Thanks for your time. ...

Flash based credit card payments?

Does anyone know how the entire checkout process including credit card validation and payment/transactions can be done in Flash, without redirecting to another HTML page? Since Flash has all the capabilities of a web browser (page requests, GET, POST) and even some goodies (cross domain page requests, sockets) I'm assuming this shouldn'...

What happens to the transaction in this SQL if it's not committed?

If I have the following SQL: BEGIN TRANSACTION SELECT val FROM myTable and don't follow it up with a commit, what happens with the TRANSACTION? Does it depend upon the context/scope that it was executed (e.g. in a proc, in mgt studio)? Is there some place to see if there are transactions open that have not been committed/rolled back ...

Nested transactions in django?

Let's say I have model app1.models.ModelOne defined with save decorated with @commit_on_success. All the exceptions caught in ModelOne.save() are re-raised. Works fine on model_one_instance.save(). However, in app2 I need to make series of insertions to ModelOne and rollback all of them if any of them fails. How do I accomplish this? ...

Hibernate template close transaction

I have next working code: Session session = null; try { SessionFactory sessionFactory = new Configuration().configure() .buildSessionFactory(); session = sessionFactory.openSession(); String id = (String) FacesContext.getCurrentInstance() .getExternalContext().getRequestParameterMap().get( "storeId"); Transac...