Or create a PCode-EXE with PBDs. Than you don't need datawindow objects in a .PBR.
But I think, that SetTransObject would fail if the datawindow object is absent.
If you have the problem also if you run your application from IDE:
- Are all retrieval arguments specified?
- Create a class (e.g. n_ds) inherited from datastore and put some code to check the error in dberror event. And use this class in your code.
- Try it with a datawindow control. So you can see some error messages or dialoges the powerbuilder may show.