Details:
Adodb
PHP 5.0.2
Question:
How could I approach catching a unique constraint violated error using Adodb?
Summary:
I believe that the real error lies within the adodb-oci8.inc.php file itself, in which the following code is ran:
if (OCIExecute($stmt,$this->_commit)) {
As you can tell, even when you create your object and run the execute method it would still not catch a unique constraint error.
try {
$db = NewADOConnection("oci8");
$db->Connect('','scott','bad-password');
$db->execute('INSERT INTO TABLE (type, id) VALUES ('B', 12)');
} catch (exception $e) {
var_dump($e);
}
Would I need to run a seperate query to check value of the primary key first?
Any ideas or suggestions would be greatly appreciated.
Thank you.