PowerBuilder Interview Question and Answers

56. What two types of computed columns are allowed in a DataWindow?
 
  • One from the database side
  • One from the client side
 
Your Name Your Email-ID
Your Answer
57. How can you print multiple DataWindows?
  We should open the print job by calling the PrintOpen() function. After that, we can print DWs by using PrintDataWindow() function. After that, we close the print job by calling PrintClose(). When we use PrintDataWindow() with PrintOpen() and PrintClose(), we can print several DataWindows in one print job. The info in each DataWindow control starts printing on a new page.
Example:
long job
job = PrintOpen() //Each DataWindow starts printing on a new page.
PrintDataWindow(job, dw_EmpHeader)
PrintDataWindow(job, dw_EmpDetail)
PrintDataWindow(job, dw_EmpDptSum)
PrintClose()
 
Your Name Your Email-ID
Your Answer
58. . How many tables can be updated at the same time in a DataWindow?
  One is updated by default. If we want to update multiple tables from DW, we have to write a script for this using MODIFY()
 
Your Name Your Email-ID
Your Answer
59. What do you use computed fields for?
  We use computed fields if we need some calculation based on column data that change for each retrieved row, some summary statistics system information (as current date and time).
 
Your Name Your Email-ID
Your Answer
60. How do you assign the transaction object to the DW control?
  We use SETTRANS() or SETTRANSOBJECT().

When we use SETTRANS(), the DW control uses its own Transaction object and automatically performs connect, disconnect, commit and rollback. The SetTransObject() tells the DW control to share the transaction object with other DW controls. We have to control the database processing and we are responsible for managing database transactions. Application performance is better when we use SetTransObject().
 
Your Name Your Email-ID
Your Answer