1. David Sternberg
  2. PowerBuilder
  3. Monday, 21 May 2018 15:22 PM UTC

Is there a way to view the update sql statement generated by a dw?

Accepted Answer
Kim Berghall Accepted Answer Pending Moderation
  1. Monday, 21 May 2018 16:30 PM UTC
  2. PowerBuilder
  3. # Permalink

Check out sqlpreview event of dw control. If you use the PFC framework there is a SQL Spy capability to view the SQL of any dw if you have the service activated.

Comment
  1. David Sternberg
  2. Tuesday, 22 May 2018 12:36 PM UTC
IF request = PreviewFunctionUpdate! THEN

 Messagebox ('SQLPreview', sqlsyntax)

END IF



Thanks, using Oracle 12, Appeon 2017 B1681, home grown IFC.  Now how do I see all the data values in the arguments like id = :1 and field2 = :2 and so on up to :15?

  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 22 May 2018 13:49 PM UTC
Hi David;



   You can even use PB's SQL Trace facility for even better SQL tracing ... with no added coding, as follows:



For example:



SQLCA.DBMS = "TRACE XXX"     // where XXX is you App's connection mechanism



HTH



Regards . .. Chris

  1. Helpful
  1. Kim Berghall
  2. Tuesday, 22 May 2018 16:15 PM UTC
The argument values will show up in the syntax (if used).

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 21 May 2018 19:27 PM UTC
  2. PowerBuilder
  3. # 1

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.

Comment
There are no comments made yet.
Matthew Balent Accepted Answer Pending Moderation
  1. Monday, 21 May 2018 16:30 PM UTC
  2. PowerBuilder
  3. # 2

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.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.