Hugo and I discussed this offline and found that he could connect with a real user/password but not with the default user ('', '') which is QTMHHTTP. Perhaps there's a permission problem with QTMHHTTP. But it's strange that an SQL error would occur on the connection attempt. db2_connect() behaves the same way, Hugo said.