1. Sorry about the mistake in the code I used in the post. I have been trying with “core_write\” not “core_read”.
2. I have even checked the database attributes and connection configurations. At first, I thought it had to do something with connection configuration and checked for it.
I found no luck with both, as I said I could only fix it with changes in the sql statement. As soon as I get some time, I will dig deep and post if I find anything.
$conn = Mage::getSingleton('core/resource')->getConnection('core_write');
$sql="UPDATE table SET field2='update' WHERE field1='value'; commit;";
$result = $conn->query($sql);