Resources
- Full support
- Partial support
Resources
$connection->debug = boolean;
Enabling debug mode makes the driver return copious amounts of debugging information from both ADOdb and the PHP driver itself. Information is displayed on both standard output (STDOUT) and standard error (STDERR) channels.
The debug option can be enabled and disabled at any time, to debug portions of a program. The earliest it can be enabled is after the inclusion of the driver, and before the connection. In the following example, the table name is spelled incorrectly (it should be products). When run without debugging, the execution of the statement simply returns false.
include '/dev/access/adodb-master/adodb.inc.php'; $conn = newAdoConnection('access'); $conn->connect('northwind'); $conn->debug = true; /* * Invalid syntax in select statment */ $recordSet = $conn->execute('select * from product');
The information returned on STDOUT is:
-----<hr> (access): select * from product -----<hr> Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot find the input table or query 'product'. Make sure it exists and that its name is spelled correctly., SQL state S0002 in SQLExecDirect in /ADOdb/drivers/adodb-odbc.inc.php on line 540 S0002: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot find the input table or query 'product'. Make sure it exists and that its name is spelled correctly. ADOConnection._Execute(select * from product, false)% line 1163, file: C:\dev\access\ADOdb-master\adodb.inc.php ADOConnection.Execute(select * from product)% line 6, file: C:\temp\access\test3.php
Information on STDERR
PHP Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine cannot find the input table or query 'product'. Make sure it exists and that its name is spelled correctly., SQL state S0002 in SQLExecDirect in C:\ADOdb\drivers\adodb-odbc.inc.php on line 540