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
 [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: Fri Apr 19 03:01:27 2024 UTC