PowerBuilder Interview Question and Answers
31. | Where is a Query stored? |
---|---|
In a .PBL file. | |
32. | How do you create a DataWindow object dynamically? |
---|---|
We use SyntaxFromSQL() and Create() |
|
33. | Why must you specify the transaction object for a DataWindow control after creating the DataWindow object? |
---|---|
The Create() function must be followed by SetTransObject() function because Create() destroys any previous association between the DataWindow and a transaction object. Then, we can issue a Retrieve(). | |
34. | Can you dynamically assign a DataWindow object? |
---|---|
Yes, using DataWindow’s control attribute “DataObject”.
DataWindow control has the attribute DataObject. If we want to change an associated DataWindow object at runtime we need to put a line in the script that changes the value of the DataObject attribute. For example: dw_1.DataObject = “d_name” |
|
35. | Let’s say, you share two DW buffers and the primary DW has some DDDW columns. Will this DDDW be shared automatically as well? |
---|---|
NO. After we have shared 2 DataWindows, we have to share all DropDowns as well. First, we have to get the reference for the Child DataWindow using GetChild() function and then do sharing by using ShareData() function. DataWindowChild dwc_1, dwc_2 dw_1.getchild(“employee”, dwc_1) dwc_1.SetTransObject(sqlca) dwc_1.Retrieve() dw_2.getchild(“employee”, dwc_2) dwc_1.ShareData(dwc_2) |
|