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
 [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: Tue Jan 18 08:03:18 2022 UTC