php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6628 MS-Access: insert statement only exec'd once
Submitted: 2000-09-08 10:18 UTC Modified: 2001-04-01 19:59 UTC
From: bruno dot de dot winter at advalvas dot be Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.2 OS: Win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bruno dot de dot winter at advalvas dot be
New email:
PHP Version: OS:

 

 [2000-09-08 10:18 UTC] bruno dot de dot winter at advalvas dot be
An insert statement on a MS Access database table only works once in the same script:

----------------------------------------------------------
  if ($conws=odbc_pconnect("DB1","Admin","")) {
    if ($result=odbc_exec($conws,"insert into MessageQueue (MsgType) values ('MESSAGEONE')) { 
      if (odbc_commit($conws)) {
          $result=odbc_exec($conws,"insert into MessageQueue (MsgType) values ('MESSAGETWO')");
          odbc_commit($conws);
      }
  }
----------------------------------------------------------

MessageQueue is a table with one field: MsgType without an index or constraint. 
The second insert is not done, although the 'odbc_commit's are succesfull and 'odbc_exec's do return a handle.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-08 10:21 UTC] bruno dot de dot winter at advalvas dot be
sorry forgot "
----------------------------------------------------------
  if ($conws=odbc_pconnect("DB1","Admin","")) {
    if ($result=odbc_exec($conws,"insert into MessageQueue (MsgType) values
('MESSAGEONE')") {       if (odbc_commit($conws)) {
          $result=odbc_exec($conws,"insert into MessageQueue (MsgType) values
('MESSAGETWO')");          odbc_commit($conws);      }  }
----------------------------------------------------------
 [2001-04-01 19:59 UTC] kalowsky@php.net
works fine for me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 23:01:28 2024 UTC