summaryrefslogtreecommitdiff
path: root/adodb-error.inc.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2016-02-23 08:38:18 +0100
committerDamien Regad <dregad@mantisbt.org>2016-02-26 10:56:50 +0000
commit041acbbc4bc134f8f39fc9d00cbe5b511e6aa07b (patch)
tree9cd90580b93af89d36a9c99b742917fd52f3e8cd /adodb-error.inc.php
parent65bcee8930e93cf27440524ea000a9b563fd3d0d (diff)
downloadadodb-041acbbc4bc134f8f39fc9d00cbe5b511e6aa07b.tar.gz
adodb-041acbbc4bc134f8f39fc9d00cbe5b511e6aa07b.tar.bz2
adodb-041acbbc4bc134f8f39fc9d00cbe5b511e6aa07b.zip
Revised Firebird driver
The new driver is no longer based on ADODB_ibase, but extends ADOConnection instead, and makes use of PHP's fbird_* functions. Fixes #201 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes to original commit [1]: whitespace, coding guidelines, phpDoc [1] http://hg.lsces.org.uk/bw/bitweaver/externals/adodb/rev/b4efbd3bfe07
Diffstat (limited to 'adodb-error.inc.php')
-rw-r--r--adodb-error.inc.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/adodb-error.inc.php b/adodb-error.inc.php
index 1fccf76a..7f4b3384 100644
--- a/adodb-error.inc.php
+++ b/adodb-error.inc.php
@@ -72,6 +72,8 @@ function adodb_error($provider,$dbType,$errno)
case 'ibase': $map = adodb_error_ibase(); break;
+ case 'firebird': $map = adodb_error_firebird(); break;
+
case 'odbc': $map = adodb_error_odbc(); break;
case 'mssql':
@@ -181,6 +183,36 @@ static $MAP = array(
return $MAP;
}
+function adodb_error_firebird()
+{
+static $MAP = array(
+ -104 => DB_ERROR_SYNTAX,
+ -150 => DB_ERROR_ACCESS_VIOLATION,
+ -151 => DB_ERROR_ACCESS_VIOLATION,
+ -155 => DB_ERROR_NOSUCHTABLE,
+ -157 => DB_ERROR_NOSUCHFIELD,
+ -158 => DB_ERROR_VALUE_COUNT_ON_ROW,
+ -170 => DB_ERROR_MISMATCH,
+ -171 => DB_ERROR_MISMATCH,
+ -172 => DB_ERROR_INVALID,
+ -204 => DB_ERROR_INVALID,
+ -205 => DB_ERROR_NOSUCHFIELD,
+ -206 => DB_ERROR_NOSUCHFIELD,
+ -208 => DB_ERROR_INVALID,
+ -219 => DB_ERROR_NOSUCHTABLE,
+ -297 => DB_ERROR_CONSTRAINT,
+ -530 => DB_ERROR_CONSTRAINT,
+ -803 => DB_ERROR_CONSTRAINT,
+ -551 => DB_ERROR_ACCESS_VIOLATION,
+ -552 => DB_ERROR_ACCESS_VIOLATION,
+ -922 => DB_ERROR_NOSUCHDB,
+ -923 => DB_ERROR_CONNECT_FAILED,
+ -924 => DB_ERROR_CONNECT_FAILED
+ );
+
+ return $MAP;
+}
+
function adodb_error_ifx()
{
static $MAP = array(