Re: PEAR MDB2 Unknown Error



On Nov 23, 2:04 pm, Rob Wilkerson <r.d.wilker...@xxxxxxxxx> wrote:
Hey all -

I'm bumping into an issue with my installation of the MDB2 package
that I'm hoping someone else has seen. I'm trying to execute a query,
but get an "unknown error" exception that I can't seem to track down
(exact message is "MDB2 Error: unknown error").

I have an ObjectDAO class (which I'm creating via a factory) that
extends an abstract DataAccessObject class. The database connection
is created in the parent class' constructor and a connection *is*
being established. I just can't seem to query against it. Here's the
code I'm trying to execute:

=======================================================

$dao = DAOFactory::createDAO ( 'Object' );
$result = $dao->conn->query ( 'SELECT COUNT(1) FROM object' );
if ( PEAR::isError ( $result ) ) {
echo '<p>SQL Error</p>';
throw new Exception ( $result->getMessage() );}

new PHPDump ( $result->fetchRow() );

exit();

=======================================================

A dump of the $dao variable indicates that all properties and members
are public, as expected. Executing "./pear version" reveals:

PEAR Version: 1.6.2
PHP Version: 5.2.3
Zend Engine Version: 2.2.0

I've been fighting this all day and can't think of anything else to
try, nor can I find any additional information via Google. If
anyone's seen this, I'd really appreciate any insight.

Looks like I've got some kind of problem connecting to MAMP's MySQL db
on OS X. I haven't tracked down what it might be, but attempting to
use the standard mysqli_connect() and mysql_connect() functions yield
a more verbose error that at least gives me somewhere else to look...
.



Relevant Pages

  • Re: Interesting Problem regarding Parameters
    ... > reasons, however we have one slight problem we would very much like to ... > logging to our database connection object. ... > query that was actually executed on the server, what I mean by that is: ... > //Set the query with parmater then execute reader ...
    (microsoft.public.dotnet.framework.adonet)
  • Interesting Problem regarding Parameters
    ... My company is currently migrating to .Net from PHP for a number of reasons, ... database connection object. ... What our current database class will do (after executing the query) is logg ... //Set the query with parmater then execute reader ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: stored proc ansi_nulls help
    ... on connection which execute your SP. ... > Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. ... Enable these options and then reissue your query. ... > I put the ansi nulls and ansi warnings in when building the proc but am still recieving the error. ...
    (microsoft.public.sqlserver.programming)
  • Re: Lost connection
    ... therefore is not possible to handle every query. ... If this is your case too then you can use the beforeExecute event of this object to check for connection problems and sort them out. ... try to execute a small dummy query something like ...
    (borland.public.delphi.database.ado)
  • Re: Lost connection
    ... therefore is not possible to handle every query. ... connection problems and sort them out. ... disable the beforeExecute event handler by setting the event to nil; ... try to execute a small dummy query something like ...
    (borland.public.delphi.database.ado)