Normally you would use the sqlpreview event which as mentioned, the PFC SQL Spy feature collects all the statements for easy viewing.
I use the SQL Server Profiler, which can be difficult to use. I always use a SPID filter to get only statements issued by my app. SQL Server Profiler is launched from the Tools menu of SQL Server Management Studio.
In MS SQL Server you can use the Profiler tool to do this. In a nutshell it shows information on all statements executed on a specified database. Usually you would set up a series of filters to specify the specify types of statements, users, ect. you wish the profiler to track so you are not overwhelmed by a huge list of items.
There are similar tools for other databases as well.
Note: the Profiler in SQL Server is a separate application, i.e., it is not part of PowerBuilder.