ADOdb Library for PHP Manual
Prev ErrorNo Next

ErrorNo()

Returns the last error number. The error number is reset after every call to Execute(). If 0 is returned, no error occurred.

Note that old versions of PHP (pre 4.0.6) do not support error number for ODBC. In general you do not need to call this function unless an ADOdb function returns false on an error.

MetaError($errno=false)

Returns a virtualized error number, based on PEAR DB's error number system. You might need to include adodb-error.inc.php before you call this function. The parameter $errno is the native error number you want to convert. If you do not pass any parameter, MetaError will call ErrorNo() for you and convert it. If the error number cannot be virtualized, MetaError will return -1 (DB_ERROR).

MetaErrorMsg($errno)

Pass the error number returned by MetaError() for the equivalent textual error message.

ErrorMsg()

Returns the last status or error message. The error message is reset after every call to Execute().

This can return a string even if no error occurs. In general you do not need to call this function unless an ADOdb function returns false on an error.

Note: If debug is enabled, the SQL error message is always displayed when the Execute function is called.


Prev Home Next
ErrorMsg Up MetaDatabases

Sponsored by phpLens