1. David Sternberg
  2. PowerBuilder
  3. Monday, 21 May 2018

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

Accepted Answer
Kim Berghall Accepted Answer Pending Moderation
0
Votes
Undo

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
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. David Sternberg
  2. Tuesday, 22 May 2018
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. Chris Pollach
  2. Tuesday, 22 May 2018
The argument values will show up in the syntax (if used).

  1. Kim Berghall
  2. Tuesday, 22 May 2018
There are no comments made yet.
  1. Monday, 21 May 2018
  2. PowerBuilder
  3. # Permalink
Roland Smith Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Monday, 21 May 2018
  2. PowerBuilder
  3. # 1
Matthew Balent Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Monday, 21 May 2018
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


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