I'm trying to configure magento using SAP as a back end. I have connected to the SAP system using php script.And also i have added data to it.Now i'm trying to update the added data, but i'm stuck on a error.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '298-1' for key 'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID'' in D:\xampp\htdocs\magento\lib\Zend\Db\Statement\Pdo.php:228
Stack trace: #0 D:\xampp\htdocs\magento\lib\Zend\Db\Statement\Pdo.php(228): PDOStatement->execute(Array)
#1 D:\xampp\htdocs\magento\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 D:\xampp\htdocs\magento\lib\Zend\Db\Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 D:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 D:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#5 D:\xampp\htdocs\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#6 D:\xampp\htdocs\magento\lib\Zend\Db\Adapter\Abstract.php(574): Varien_Db_Adapter_Pdo_ in D:\xampp\htdocs\magento\lib\Zend\Db\Statement\Pdo.php on line 234
Kindly help me solve this issue.
Try performing a full reindex from System>Index Management in the admin. If that fails, truncate the cataloginventory_stock_status_idx
table and reindex, then run your script again.
If one has installed the extension "Market Ready Germany", you need to make sure your browser is sending a referrer – otherwise the above error will occur. (With no hint on the referrer…)