2008年9月4日 星期四

PHP5: query DB2 encounter SQL0204N

Warning: PDOStatement::execute() [function.execute]: SQLSTATE[42S02]: Base table or view not found: -204 [IBM][CLI Driver][DB2/LINUX] SQL0204N "WEB.STAFF" is an undefined name. SQLSTATE=42704 (SQLExecute[-204] at /tmp/pear/temp/PDO_ODBC/odbc_stmt.c:133) in /home/web/public_html/php5_pdo_fetch1.php on line 31
After execute(), result set has 0 columns (should be 2)


Solution:

Add . /home/web/sqllib/db2profile into /etc/init.d/apache2
and restart apache server
#/etc/init.d/apache2 restart

沒有留言: