Multiple-Choice Questions About Powerbuilder Part 9
SQLCA stands for:
Structured Query Language Communication Area
What type of events you can define at the application object?
Any event that is available in the event declaration dialog box.
Only events that are not related to the user interactions.
Only events that are related to the distributed processing.
Only DDE events.
None of the above
SQLSA stands for:
Structured Query Language Dynamic Staging Area
Application’s open has the following script
PowerBuilder stops the application as soon as the above script execution completes.
Application keep waiting till it encounters Exit() function.
Application keep waiting till ‘Halt’ or ‘Halt with Close’ statement.
The above script is wrong. You can’t write anything other than the Open() function in the application’s Open event.
SQLDA stands for:
Structured Query Language Dynamic Description Area
Which one of the following is faster?
Enabling and Disabling a menu item.
Hiding and Displaying a menu item.
Creating menu items dynamically as and when needed and destoring them when done.
All of the above gives the same performance.
DDE stands for:
Dynamic Data Exchange
Application Object ConnectionBegin is fired when the connection begin in:
Server Application Only
Client Application Only
In Both Client & Server Applications
Depends on the Settings
None of the above
OLE stands for:
Object Linking and Embedding
Makes the application idle and stops taking input from the user.
Fires the Application object Idle event after the specified number of minutes.
Fires the Application object Idle event after the specified number of seconds.
Checks whether the application is idle and returns True/False value.
PowerBuilder doesn’t have Idle() function.
MAPI stands for:
Messaging Application Programming Interface
Fires Application SystemError event.
Called from the SystemError event to indicate the error processing is about to begin.
Checks for any error signals.
Populates the Error object and fires Application SystemError event.
It is a wrong function. It should be ErrorSignal().
Which function changes the focus to a different column in a DataWindow?
A Datawindow is passed to a function as Read-Only. Can the code in the function assign another DataWindow to the parameter Datawindow?
What is the function used to change the value of a column in a DataWindow?
When a general error occurs at run-time and the Application SystemError event has no script:
PowerBuilder displays error information and stops the application.
PowerBuilder displays the error and allows the user to choose to continue/stop the application.
you can’t run a PowerBuilder application without writing script to the SystemError event.
logs the error informaton to a log file and continues application execution without displaying the error.
You can control error processing by calling SetErrorActionCode() function.
Which DataWindow function displays an icon to indicate the current row in a DataWindow?
You specify the start-up window name:
by calling the Open() function in the Application Object Constructor event.
by calling the Open() function in the Application Object Open event.
in the application object’s properties dialogbox at the design-time.
by turning the window’s StartupWindow property on at run-time.
Any of the above is correct.
What is the function used to display a window as a sheet in a MDI window?
OpenSheet or OpenSheetWithParm
Sorting can only be done at the client?
When you open a window using OpenWithParm(), where the parameters are stored?
Which of the following is correct.
You can inherit application object only once per application.
You can limit the number of times an application can instantiate.
You can declare only Public functions at the application object.
Application Objects can be shared between different applications, when the applications are developed in the ‘PowerBuilder Enterprise edition’.
None of the above.
What is the event that is fired automatically when you close the window?
Variables declared in the Application Object are:
global by default.
private to the application object.
local to the event in which the variable is declared.
None of the above.
Answer A and B are correct.
What is the pronoun used to refer to the ancestor from a descendent?
What events you can declare at the menu object?
Only Menu related events.
Only events that are not mapped to any event id.
Only PowerBuilder custom events.
There are no restrictions.
None of the above.
In the client application, after connecting to the DPB server, which function you should call before firing any event/function on the proxy object?
Which one of the following attribute a Response window can’t have?
Maximize & Minimize buttons
A DataWindow control dw_1 has a composite DataWindow (has three DataWindows). How many times the SQLPreview() event is fired when you call dw_1.Retrieve()?
Number of Rows in DW Object 1 + DW Object 2 + DW Object 3
Number of rows in the first DW object specified.
Number of rows from the DW Object that you specify as Main DW object.
Total number of rows in all updatable DW objects in that DW.
Disabling a menu item will:
disable the associated toolbar icon.
hide the associated toolbar icon.
not affect the toolbar icon.
display ‘X’ symbol in red color on the toolbar icon.
What is the maximum number of letters an identifier in PowerBuilder can have?
A menu item can have:
two toolbar icons, one to display when the menu bar item is enabled, and another is when the menu bar item is disabled.
two toolbar icons, one to display when the menu item is displayed, and another is when the menu bar item is hidden.
two toolbar icons one icon is for default display and another is when the mouse button is depressed.
You can’t associate more than one toolbar icon to a menu item.
You can associate any number of toolbar icons to a menu item and control which one to display in the script.
What is the function used to change the SQL statement of a DataWindow? (Other than the Modify function).
When you declare an instance variable with public access at a menu, that variable can be accessed from:
the parent window only.
any open sheet in the MDI application.
the parent window and the MDI window.
the menu and the active sheet.
the menu only.
Which DataWindow function applies DataWindow changes to the Database?
The ITEM attribute of a menu:
contains the menu item name.
is an array and contains one element for each of the menu bar item.
is an array and contains all the menu bar items and menu items ( one element for each item).
Menu doesn’t have ITEM attribute. It has CONTROL attribute.
None of the above.
Which DataWindow function applies EditControl buffer content to the DataWindow Primary buffer?
Which one of the following refers to the associated menu from the Window’s Activate event?
None of the above
Which function refreshes the Datawindow automatically at a certain intervals?
Return the refresh interval from the DatWindow RefreshTimer event
Set the DataWindow Timer property
None of the above
Pronoun ‘ParentWindow’ and ParentWindow() refers to the samething.
The function name that is used to select/de-select a item in a ListBox.
Referring to ‘This’ from one of the Menu Item refers to:
Menu bar item
The Menu item in which event the pronoun THIS is coded.
THIS is not a valid pronoun in the menu.
Which function is used to change the SQL statement of a Datawindow, but restricted to call from a single event.
Which one of the following is not a valid menu event?
Which function is used to re-select a row when the row is found as changed between retrieval and update.
A window has three controls, one RadioButton, one CommandButton and one custom UserObject. That UserObject has four controls in it. UpperBound( This.Control ) in the Window’s Open event returns:
What is the equalant function for Window1.Visible = False
CloseQuery event is best described as:
Fires automatically when the database query is completed.
Trigger or Post this event to cancel the database query.
Fires before the window’s ‘Close’ event.
None of the above.
Which function sets the mask for the EditMask control.
The total height of the specified window minus the total height of toolbar,statusbar, and all the controls placed on the window.
The total height of the specified window minus the sum of border, toolbar, menubar, statusbar, titlebar heght.
The second option, but applies only for the MDI Frame/Help windows.
The second option, but doesn’t apply to a response window.
There is no such function. The window has an attribute ‘WorkSpaceheight’ which you can refer directly.
Which function gives the unformatted data from a EditMask control.
Which one of the following statement is true?
A window control can be dragged and dropped on another window.
The above option is correct with once exception; it is applicable only among sheets in a MDI frame window.
You can drag any non-sheet window and drop it on the Operating System icons such as Printer, Mailbox, etc.
A Window control can be dragged and dropped only within the same window.
Option D is correct with one exception; It applies to only those controls that are inherited from the DragObject object.
Which function returns the current row in the DataWindow.
Hangs the application.
Closes the application.
Closes the application, but executes the Application Close event.
There is no HALT statement in PowerBuilder. We have STOP statement.
Stops taking input from the user till the specified time.
Which function returns the reference handle of a child DropDownDataWindow?
In a SingleLineEdit control, the Modified event fires when:
Every time user types something in the SingleLineEdit Control.
The user completes typing and press TAB or ENTER key or change the focus by clicking on other control.
The content of the control is emptied out.
SingleLineEdit doesn’t have Modified event. It has EditChanged event.
Which function inserts/appends a brand new record into a DataWindow?
Which of the following adds a new menu item to the existing menu?
ADD MENUITEM ‘ItemName’ ‘ItemText’
APPEND MENUITEM ‘ItemName’ ‘ItemText’
Find the upperbound of the ITEM and add one more element to the ITEM array and populate value and call MenuObjectName.Refresh
None of the above.
Write the code in a single line to insert a row just before the current row. Assume, there are few rows in the DataWindow dw_1 and the user clicked on one of the valid row.
A window event/function has the following script:
No matter where you code it, it will result in compilation error unless you call this on a MENU object.
Refers to the parent window, i.e., MDI window if this window is opened as a sheet in the MDI window. Otherwise, it referrs to NULL.
Refers to the associated WINDOW.
Since, window doesn’t have a PARENT, it refers to the WINDOW itself in which it is called.
Enter the Datawindow function name that returns the total count of rows that are scheduled for either INSERT or UPDATE in the database.
What will happen if you call This.ParentWindow() in a window’s script?
You will get compilation error since there is no function ‘ParentWindow()’. PowerBuilder only has a ‘ParentWindow’ pronoun.
Returns the MDI Frame window name, if this function is called from one of the sheet in a MDI application. Returns NULL when called in the MDI window’s script.
You can only call the ParentWindow() function from a menu item script.
What is the Datawindow function name that returns the total count of rows that are scheduled to DELETE from the database.
Which one of the following is true?
You can’t write IF…ELSE statement in one line.
You can write as long as each block (IF block, ELSE block) contains only one Statement.
You can write as long as the commands in each blocks are separated by a semicolon and each block is enclosed in curly brackets.
This type of structure is allowed only in the DataWindow expressions.
If you wanted to put a picture of a hand pointing to the current row of a DataWindow, what function would you use?
Assume three local integer variables, i, j, k are declared. Can you assign a value to all those three variables in one step – such as i = j = k = 100
A file can be copied into a DataWindow using ____________ function.
What should I do if I want to issue multiple PowerScripts commands in one line?
Yes, you need to separate each command with a colon.
Yes, you need to separate each command with a semicolon.
Yes, you need to separate each command with double hyphens.
Multiple statements on one line is not supported in PowerScript
______________ function is used to add/insert a new row in the Datawindow and set the row with the value from a string.
Which of the following property minimizes the window to an icon.
None of the above. Call WindowName.Minimize() function.
Which function copies data from the Clipboard into a DataWindow?
Can a PowerBuilder window have it’s own vertical/horizontal scrollbars? (Not the scrollbar controls).
Which function is used to change a validation rule in a DataWindow at runtime.
The UPDATE statement in an embedded SQL statement updates 10 rows. What would be the value of SQLCODE?
Which function is used to change the sort criteria for a DataWindow?
How do you refer to the host variable in an embedded SQL
Prefix the variable with colon.
Prefix the variable with pound sign.
Prefix the variable with double colon.
Prefix and suffix the variable with question mark.
No prefix or suffix is required. Just use like any normal variable.
Which command will order the DataWindow records on a specified key at runtime?
Howmany Dynamic SQL formats are available in PowerBuilder?
Dynamic SQL is not supported by PowerBuilder
Which command/function will blank out a DataWindow?
product_master table has 10 rows. The host variable
‘p_desc’ in the
The product_description of the first row from the product_master table.
The product_description of the last row from the product_master table.
The product_description of all the rows from the product_master table.
PowerBuilder doesn’t compile a embedded SQL statement unless the SQL statement has a WHERE clause.
Results are unpredictable
Which DataWindow buffer stores the deleted rows?
The UPDATE statement in an embedded SQL script did not update a single row. What would be value of SQLCODE?
Results in error.
Which DataWindow buffer stores the modified values of a row?
Which one of the following returns the number of rows affected by a SQL Statement?
Which Datawindow buffer stores the filtered rows?
Which one of the following contains the database specific (error) information?
Which Datawindow buffer stores the original values of a modified row?
When connecting to the SQL AnyWhere database, which one of the following is true?
You should populate SQLCA.UserID with the user name.
You should populate SQLCA.LogID with the user name.
PowerBuilder automatically determines your login name using Windows SDK for you. You don’t have to populate your login name.
You should populate SQLCA.UserID and you should also specify in the DBParm.
You need to populate SQLCA.UserID and SQLCA.LogID
Which Datawindow buffer contains the text that is currently being entered by the user?
When you are connecting to the Adaptive AnyWhere database using Open Database Connectivity, what should be the value you need to set for SQLCA.DBMS?
Write the function that determines whether the last actionin the DataWindow can be cancelled or not.
TransactionObject.DBHandle() returns a positive long value:
as long as the Transaction object is connected to the database.
as long as the transaction object is not destroyed.
Only when the database connection is busy because of database queries.
Only when the database connection idle.
Only when the database exists.
List the function that cancel the current DataWindow query.
Which one of the following is the ancestor to the SQLCA?
Which function returns the total number of elements, i.e. subscripts, in an array?
When you change the SQLCA value to MyTransaction in the Application Painter:
MyTransaction becomes the ancestor to the SQLCA
MyTransaction becomes the descendent to the SQLCA
MyTransaction becomes the ancestor to Transaction
SQLCA becomes the grand parent to MyTransaction
You can’t change it.
How many times the SQLPreview event triggers when a Datawindow has three nested DataWindow reports.
I would like to have a function available at the SQLCA. What should I do?
Define the function in the SQLCA.
define the function in the ‘Transaction’ object.
Create a user object of type transaction and define the function and insert the user object between transaction and SQLCA.
It’s not possible in the current version. May be in future versions.
Define the function in the function painter and Open the SQLCA object and list the previously defined function here.
List the function that lists the first subscript number of an array.
SQLCA is available only in the Client PowerBuilder applications. It’s not available in the Server PB Applications. You need to use ServerSQLCA in the Server PB Applications.