PowerBuilder Interview Question and Answers:
56. 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).
57. 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().
58. What two types of computed columns are allowed in a DataWindow?
One from the database side
One from the client side
59. 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()
60. . 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()
No comments:
Post a Comment