php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5803 odbc_rollback fails with MS Access DB but returns true anyway
Submitted: 2000-07-26 23:37 UTC Modified: 2000-07-27 09:15 UTC
From: vladimir dot prilepsky at roche dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.0 OS: WinNT 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vladimir dot prilepsky at roche dot com
New email:
PHP Version: OS:

 

 [2000-07-26 23:37 UTC] vladimir dot prilepsky at roche dot com
I have a hard time to abort transaction
I'm using Access 97

$connection_id=odbc_connection("DSN","","",);
$result=odbc_exec($connection_id, "Select * from table");
odbc_result_all($connection_id);
//prints 5 rows

$result=odbc_exec($connection_id, "Delete * from table where ID=1");
$ suc=odbc_rollback($connection_id);
echo "$suc";
//prints 1 it means rollback succed

$result=odbc_exec($connection_id, "Select * from table");
//prints 4 rows 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 09:15 UTC] kara@php.net
By default, odbc connections are in autocommit mode. Use odbc_autocommit to toggle this off.
Odbc_rollback() tries to rollback outstanding transactions on the connection, if there aren't any, this is still considered as success. Only "real" errors, such as not being able to rollback a transaction will return failure.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 19:01:37 2025 UTC