Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction still active with sqlsrv driver. #1882

Closed
Corvillus opened this issue Jul 15, 2013 · 3 comments
Closed

Transaction still active with sqlsrv driver. #1882

Corvillus opened this issue Jul 15, 2013 · 3 comments

Comments

@Corvillus
Copy link

Using DB::transaction() with the Windows pdo_sqlsrv driver causes this error to appear:

SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]A transaction that was started in a MARS batch is still active at the end of the batch. The transaction is rolled back.

@crissi
Copy link
Contributor

crissi commented Jul 25, 2013

It is happending to me also.

I have only tested this using Capsule.

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]A transaction that was started in a MARS batch is still active at the end of the batch. The transaction is rolled back.' in C:\caseon.dk\cn.new.caseon.dk\vendor\illuminate\database\Illuminate\Database\SqlServerConnection.php:15

Stack trace:
#0 C:\caseon.dk\cn.new.caseon.dk\vendor\illuminate\database\Illuminate\Database\SqlServerConnection.php(15): PDO->exec('BEGIN TRAN')
#1 [internal function]: Illuminate\Database\SqlServerConnection->transaction(Object(Closure))
#2 C:\caseon.dk\cn.new.caseon.dk\lib\Capsule\DB.php(24): call_user_func_array(Array, Array)
#3 C:\caseon.dk\cn.new.caseon.dk\ajax\discountGroupDetails.php(64): Capsule\DB::__callStatic('transaction', Array)
#4 C:\caseon.dk\cn.new.caseon.dk\ajax\discountGroupDetails.php(64): Capsule\DB::transaction(Object(Closure))
#5 C:\caseon.dk\cn.new.caseon.dk\controllers\frontController.php(32): discountGroupDetails->save()
#6 {main}
thrown in C:\caseon.dk\cn.new.caseon.dk\vendor\illuminate\database\Illuminate\Database\SqlServerConnection.php on line 15

@Corvillus
Copy link
Author

I have a solution for this in pull #1883.

@taylorotwell
Copy link
Member

This should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants