php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61199 SQLSRV problem to create new Transaction
Submitted: 2012-02-28 07:38 UTC Modified: 2012-02-28 08:51 UTC
From: mohammad dot saberi at gmail dot com Assigned:
Status: Open Package: sqlsrv (PECL)
PHP Version: 5.3.10 OS: Windows 7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-02-28 07:38 UTC] mohammad dot saberi at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.sqlsrv-begin-transaction.php
---
I've used SQLSRV driever ver.2 with PHP. I must use SQL Transactions in my codes. 
But I get this error sometimes:
"New transaction is not allowed because there are other threads running in the 
session"

I updated SQL SERVER Native client too, but it could not solve anything.

Test script:
---------------
<?php
// This is my psudo code
if (sqlsrv_begin_transaction( $sqlsrv->sqlsrvLink ) === true) {

   $firstQuery = sqlsrv_query($stmt1);
   if (!$firstQuery) {
      sqlsrv_rollback();
   } else {
      $nextQuery = sqlsrv_query($stmt2);
      if (!$nextQuery) {
         sqlsrv_rollback();
      } else {
         sqlsrv_commit();
      }
   }

}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-28 08:51 UTC] pajoye@php.net
-Package: Unknown/Other Function +Package: sqlsrv
 [2012-02-28 08:51 UTC] pajoye@php.net
fix package
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 17:01:36 2019 UTC