php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32041 Deleteing From a MS Access Database using PHP
Submitted: 2005-02-21 09:55 UTC Modified: 2005-02-21 19:32 UTC
From: mark dot horwell at uhns dot nhs dot uk Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 4.3.10 OS: Windows XP
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: mark dot horwell at uhns dot nhs dot uk
New email:
PHP Version: OS:

 

 [2005-02-21 09:55 UTC] mark dot horwell at uhns dot nhs dot uk
Description:
------------
When ever i try to delete a record with a MS access database I get the following error message

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables., SQL state S1000 in SQLExecDirect in C:\Estates Info System\admin\Delete_Site.php on line 13

I know ther no problem with the sql statment, not sure what to do.

I am using PHP, IIS and MS access

Please Help

Reproduce code:
---------------
<? 
$connect = odbc_connect ("Information_System","root","");
$query = "DELETE FROM Site WHERE(((Site.[Site Code])='076'))";
odbc_exec($connect, $query);

?>

Expected result:
----------------
Record with key 076 whould be deleted but is not

Actual result:
--------------
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables., SQL state S1000 in SQLExecDirect in C:\Estates Info System\admin\Delete_Site.php on line 13

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-21 11:32 UTC] mark dot horwell at uhns dot nhs dot uk
Managed to solve the problem, it was an issue with file permissions, where only set to read only on the database.

Thanks
 [2005-02-21 19:32 UTC] sniper@php.net
User error -> bogus.

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 21:03:37 2022 UTC