AS400 Adapter Service Error

I am trying to read(select) records from a DB2 table using AS400 Adapter Connection. I am using customSQL template. When I run the service I am getting this error:

Error: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service
Exception in Execution [SQL0516] Prepared statement QZ8AAF1826DA0B438A not found

I could select records using same adapter connection from a different table. Can somebody please help??

Thanks
Srini

Did you checked if your sql statment works with DB client tool,and make sure your query works then start debugging the customSQL service about the problem.

HTH,
RMG

I found the reason why I am getting this error.
The adapter connection is pointing to a different library. The table I am trying to read from is not in that library. I changed the adapter connection parameters and it started working fine again.
Thanks RMG for your input

Srini