> -----Original Message-----
> From: Eddie Wilson [mailto:[EMAIL PROTECTED] 
> 
> ZF 1.0.1 helped a great deal... Thanks
> 
> The i5 wants to use the default ZC userid and balks at 
> sending your own. I guess that was not surprising as that is 
> what is expected without ZF. If I leave 
> database.params.username and database.params.password blank 
> in the config.ini the error returned is:
> 
> Warning: db2_fetch_assoc() expects parameter 1 to be 
> resource, boolean given in 
> /usr/local/Zend/ZendFramework/library/Zend/Db/Adapter/Db2.php 
> on line 284
> 
> Any thoughts? I am willing to test.

Okay, I'm not an DB2 expert, and I've never used i5/OS, but here's a
test that might help narrow down the problem.

1. Open <zf-home>/library/Zend/Db/Adapter/Db2.php

2. Go approximately to line 280.  Find the line in function listTables()
that reads: 
   $stmt = db2_tables($this->_connection);

3. Edit it and add lines so it looks like this:
   var_dump($this->_connection);
   $stmt = db2_tables($this->_connection);
   var_dump($stmt);

5. Run your test application (the zfgrid demo).

Here's what I see in the output:

  resource(557) of type (DB2 Connection)
  resource(589) of type (DB2 Statement)

I have specified the username and password in my Zend_Db options.  If I
don't I get errors indicating that those options are required.

If the first var_dump() shows anything other than a resource of type DB2
Connection, you probably have a problem connecting to the database.  If
the second var_dump() shows anything other than a resource of type DB2
Statement, you have a problem fetching a list of tables.  Did you
specify a database?  Do you have any tables in this database?

Regards,
Bill Karwin

Reply via email to