If you're using adapter, please check out in the documentation the catalog name overwriting functionality for adapter in 'Using the generated code -> Adapter -> DataAccessAdapter functionalty' under 'Catalog specific persistence info'. Also, check out 'Application configuration through .config files' in 'Using the generated code'.
If in doubt, please turn on DQE tracing, which allows you to see which queries are generated. You can redirect the trace output to a textfile using a .config setting. Please check out 'Troubleshooting and debugging' in 'Using the generated code'.