Multiple-Choice Questions About Powerbuilder
Which of the following are advantages of using the Modify method over dot notation?
Modification of properties in nested DataWindows is allowed.
The control and property to be modified can be expressed programmatically
Invalid references to DataWindow objects generate compiler versus runtime errors.
The resulting application code runs more quickly.
Controls in the DataWindow can be created and destroyed dynamically.
Which of the following is not a valid metadata SaveAs type and storage format? (Choose 3)
Which of the following classes is not a descendant of PBDOM_OBJECT?
The XSLTGen.PublishPath refers to ______
a reference to the currently associated XML template
HTML/JS for transmission to a browser client by the web tier server
the physical path of the Web site folder to which HTMLGenerator100 publishes the generated XSLT document.
Web DataWindow controls are of the following class type when they are defined on a 4GL Web Page.
Are ignored when the DataWindow Object is used on a 4GL JSP page
Can be set by invoking the HTMLGenerator100 component SetWeight method and passing appropriate parameters
Have no effect on the generation characteristics of the XML Web DataWindow
Can be set in the DataWindow Object Painter
Can be set in a web editor Design Time Control
Which statement best describes what it means to select the elative radio button on the enerate Path in Script option of the Web DataWindow DTC?
The DataWindow Object will be included in the Web Target
The DataWindow Object must be manually deployed to the web server
The library in which the DataWindow Object exists is deployed with the web site
The path to the pbl of the DataWindow Object is written into the script of the page
On a 4 GL DataWindow JSP page, which are server side events? (Choose 3)
Which statement is TRUE regarding functions and events? (Choose 2)
events can be posted functions cannot be posted
The default behavior of a function is to override; the default for an event is to extend
Functions and events can be both mapped and unmapped
Both functions and events can be made private
______________ is an Object Oriented Concept in which a function in a descendent object replaces a function of the same name and argument list on its ancestor object.
Choose the best description of the following line of code (assume n_tr_tran is a descendant of the system class transaction): n_tr_tran = create n_tr_tran
An instance of n_tr_tran will be created in memory, because no refereneces exist for it, the object will be destroyed.
This code will load the n_tr_tran class into the class pool, but no objects will be created in memory.
This code will not compile, because n_tr_tran is not a valid reference variable.
The n_tr_tran object will be created and a global reference variable of the same name will automatically be declared.
A class that becomes instantiated is called:
an extension class.
an abstract class.
a base class.
a concrete class.
Identify the TRUE statements with regard to external functions? (Choose 3)
Global external functions are available anywhere in the application but can also be restricted as a part of the object’s definition.
External subroutines are the same as external functions except that they return a value.
Local external functions must be declared before using it in script.
Global external functions do not need to be declared before using them in script.
Local external functions are part of the object’s definition and can always be used in scripts for the object itself.
Local external functions can be made accessible to scripts other than that of the object for which it has been declared.
An event is defined with arguments. If it is invoked via the TriggerEvent() or PostEvent() functions
The event will ail silently
Attempts to access the arguments will result in a run-time error.
The arguments are initialized to appropriate default values.
The arguments will be NULL.
Which of the following statements are TRUE when using the DYNAMIC keyword? (Choose 2)
When using the DYNAMIC keyword the actual method signature is determined at execution time.
The DYNAMIC keyword indicates that it is Strongly typed by the compiler.
The DYNAMIC keyword applies only to methods that are associated with an object.
You can call Global functions using the DYNAMIC keyword.
Identify the CORRECT statements with regard to the AncestorReturnValue variable? (Choose 2)
The AncestorReturnValue variable is generated if you extend the ancestor script and use the CALL syntax to call the ancestor event script.
When you extend an event, the compiler automatically generates a local variable called AncestorReturnValue.
When you extend an event, the compiler automatically generates an instance variable called AncestorReturnValue.
The AncestorReturnValue variable is generated if you override the ancestor script and use the CALL syntax to call the ancestor event script.
Class n_utility consists primarily of general utility functions and has the AutoInstantiate property set. A global variable of class n_utility, gnv_utility, is declared in the application. Which of the following are TRUE? (Choose 3)
gnv_utility is accessible throughout the application.
n_utility’s methods and properties may be accessed directly through the class.
The statement “gnv_utility = CREATE n_utility” may be used to reinitialize the instance.
If n_utility declares an instance variable of class n_utility, the object will not save.
n_utility represents an appropriate use of the AutoInstantiate property.
In the code shown below, what is the value of
Causes a runtime error
Which event gets triggered only at the time of first expansion of an item in a Tree View?
A tab control containing one page is instantiated when a window is opened. Which of the following methods will most efficiently add tab pages with potentially different content?
Considering the following lines of code and assuming all
references are valid, which of the statements below are TRUE? (Choose
The tab page becomes immediately selected
Two tab pages are placed in the tab control
Constructor events for controls on the tab page are immediately triggered by the system
Only one tab page is placed in the tab control
The newly added user object references are added to the tab control’s Control array
Which of the following have a control array? (Choose 2)
Which of the following should be used for multiple selections?
Level 0 in a Treeview represents which of the following?
Last level of items
First level of items
An error condition
Compare Structures and autoinstantiated Custom Class UserObjects: Which statements are TRUE? (Choose 2)
Both are created when they are declared and destroyed when they go out of scope.
Declaring the variable does not allocate memory for the object. After you declare it, you must instantiate it with a CREATE statement.
Both can be inherited from an ancestor class.
Both use dot notation to refer to properties.
Given a Custom Class User Object n_counter ,
having the instance variable:
This code will not compile
You have the following user objects and methods defined n_foo
n_bar myCompmyComp = CREATE n_barmyComp.of_hello()
Which of the following are methods of the SOAPConnection object? (Choose 3)
When implementing a UDDI browser you use methods of the which class?
Which of the following is minimally mapped in a PowerDesigner Class Diagram?
Which libraries need to be deployed with every PowerBuilder 10 application, regardless of functionality? (Choose 3)
Which of the following DataWindow presentation styles are NOT supported with regard to accessibility support? (Choose 2)
What is the default encoding format for the FileOpen() function?
You can use try-catch statements in your code if you plan to distribute your application:
with DLLs or PBDs
with only DLLs
only when not using the PowerBuilder Runtime Packager
with only PBDs
Which of these are invalid return types from a method in an EAServer component serving as a web service? (Choose 3)
The PowerDesigner plug-in allows the developer to perform which tasks? (Choose 2)
Reverse-engineer a database to a Physical Data Model
Generate PowerBuilder code/classes from a model
Create a Java object-oriented model
Selectively reverse-engineer PowerBuilder classes in a specified target
What are the differences between user-defined object functions and user-defined global functions? (Choose 3)
Only object functions can throw exceptions
The access level of a global function can be changed
User-defined global functions can be inherited
Only object functions can be overloaded and overridden
User-defined global functions can be called from DataWindow expressions
What functionality does the FileReadEx method have that the FileRead method does not?
ability to read binary files
ability to read files specified via Unified Naming Convention (UNC)
ability to read more than 32K bytes at a time
ability to read Unicode files in addition to ASCII files
Assuming that the DataWindow object d_employee is in the
same PBL as the object with the following script, which lines that display a
message box will be executed?
Line 6 only
Line 14 only
Line 8 and Line 14
Line 10 and Line 14
Line 6 and Line 14
Using the Call Stack view, you can
examine an expandable list of objects currently in memory
change the values of variables while debugging a remote object
change the values of local variables
examine the sequence of function calls leading up to the script or function that was executing at the time of the breakpoint
Assuming the default behavior for the Transaction object, in which of the following situations will PowerBuilder commit an open transaction? (Choose 2)
You issue the statement EXECUTE IMMEDIATE egin transaction before executing the database modification statements.
Your application encounters an uncaught runtime error and exits.
You change SQLCA.AutoCommit from true to false.
You change SQLCA.AutoCommit from false to true.
In what event might you restart or shutdown your application when there has been no user activity for a specified period of time?
application’s Close event
MDI window’s Activate event
application’s Idle event
active window’s Timer event
Which of these tasks can be performed in both the System Tree and the Object Browser? (Choose 3)
View registered ActiveX controls
View the inheritance hierarchy of a set of classes
View a class’s defined functions
View a list of global functions
Considering the following invalid line of code, which of the statements below are TRUE? (Choose 2) dw_1.Object.DataWindow.NotReadMeOnly = 45
If nested within an appropriate Try Catch block, no error handling events will occur.
A DataWindow control Error event will be invoked and if the error is not handled there, the SystemError event will be invoked and the application terminated.
If nested within an appropriate Try Catch block, the catch block will execute follow by a SystemError event.
The SystemError event will be invoked and if the error is not handled there it will be followed by the DataWindow control Error event.
A DataWindow control ItemError event will occur.
What is the effect of the following Powerscript statement: my_app.FreeDBLibraries = TRUE
PowerBuilder libraries are held in memory after PowerBuilder disconnects from a database.
Process initialization issues are resolved when PowerBuilder libraries are removed from memory.
PowerBuilder libraries are released from memory after PowerBuilder disconnects from a database.
By releasing PowerBuilder libraries from memory after disconnecting from a database, performance is enhanced.
Event ue_sum(ref Integer a, Integer b)
After Run below power builder program what result will
1 — > 2 –> 3 –> 1 — > 2 –> 3 –> 1 — > 2 –> 3
1 –> 2
1 — > 2 –> 1 –> 2… Result is a infinite loop.
1 — > 2 –> 1 — > 2 –> 1 — > 2
Which of following about the Debugger mode for Breakpoint
set is correct？
Running PowerBuilder script as below, which answer is
right about ls_str?
Script is error.
How to obtain dw_1 nested inside the first row, first column reports dw_ns Value.
Which cross report the following statement is correct?
You can update only a single table
You can update multiple tables simultaneously.
It does not support data updates.
With update attribute.
Which of the following is wrong about the PB Dynamic SQL?
String ls_sql,ls_factnm,ls_factno ls_factno = ‘131’ ls_Sql = ‘SELECT fact_nm from factm where fact_no = :A1;’ EXECUTE IMMEDIATE :ls_Sql INTO :ls_factnm USING :ls_factno;
int li_id string ls_sql,ls_name,ls_filter ls_filter = ‘1’ ls_sql=”SELECT id,name FROM temp_test WHERE id>?” DECLARE c1 DYNAMIC CURSOR FOR SQLSA; PREPARE SQLSA FROM :ls_sql; OPEN DYNAMIC c1 USING :ls_filter; FETCH c1 INTO :li_id,:ls_name; DO WHILE SQLCA.SQLCODE=0 // FETCH c1 INTO :li_id,:ls_name; LOOP CLOSE c1;
STRING ls_sql ls_sql = “INSERT INTO TABLE TEMP_TEST VALUES(1,’TTTT’)” EXECUTE IMMEDIATE :ls_sql;
int li_id li_id = 1 PREPARE SQLSA FROM “DELETE TEMP_TEST WHERE id=?”; EXECUTE SQLSA USING :li_id;
When declaring a variable (non PB keyword) in the PB code, PB will traverse the program to have the same variable name in the program, what is the traversal order of PB?
instance variable–>local variable–>shared variable–>global variable
global variable–>local variable–>shared variable–>instance variable
local variable–>shared variable–>global variable–>instance variable
shared variable–>local variable–>global variable–>instance variable
What Functions Can DataStore Use?
Which are probably return values in ItemError Event?
Which events exist in a DataStore?
Which of the following about the Status Flag for DataWindow is correct?
Use Update Function for DataWindow, only DataModified! And NewModified! Generates SQL syntax
When insert a row, column’s status flag is New!
When insert a row and key in data, column’s status flag is DataModified!
When data retrieve from the database, column’s status flag is NotModified!
When insert a row, row’s status flag is New!
In PowerBuilder, which Function can get data ?
In oracle,cursor operator including below:
Which option is not Default value of MessageBox function button parameter?
STRING LS_FRONT, LS_BACK, LS_PASS, LS_PASS_2
Itemchanged return value argument is correct?
1 Reject the data value and do not allow focus to change
*-1 Reject the data value and do not allow focus to change
0 (Default) Accept the data value
2 Reject the data value but allow the focus to change
Which can inherit?
which of the following statements is wrong in Powerbuilder ?
You can delete an ancestor function from within a descendant
Descendant can use ancestor’s functions(no set private)
when you write event scripts in a descendent object, you can extend or override scripts that have been written in the ancestor.
when you write event scripts in a descendent object, you can cancel inheritance scripts that have been written in the ancestor.
Which of the following Variable equals 10?
long a = 10.3
int a = 9.5
double a = 10.0001
decimal a = 10.09
real a = 10
String string_now, org_string,col_ary
Try Catch (Throwable th) Catch (Exception ex) End Try What would happen when compiling the above code?
Error: Illegal data type: Throwable, Exception
Error: Catch statement unreachable. Ancestor (or same type) is caught in previous statement.
Error: Undefined variable: th, ex
Choose the correct answers which are valid reasons for using DataStores?
As part of a strategy to partition business logic from the user interface.
To retrieve, store and manipulate data that does not need a visual representation.
to perform multi-table updates which are not supported by the DataWindow.
Perform database access on the user computer
What method is overloaded in PBDOM_ELEMENT ?
removechildelement ( )
isrootelement ( )
What are the join types for multi-table?
Full outer Join
Left outer join
What are the default values for the following types?
Default value of Date type is 1900-01-01
Default value of Bolean type is true
Default value of Time type is 00:00:00
Default value of String type is NULL
About the PB script, Which one of the following is true?
None of the answers
You can write in one line as long as each block (IF block, ELSE block) contains only one Statement.
You can’t write IF…ELSE statement in one line.
You can write in one line as long as the commands in each blocks are separated by a semicolon and each block is enclosed in curly brackets.
Related to Menu object,Please select the correct description
The ITEM attribute of a menu contains the menu item name
refers to the associated menu from the Window’s Activate event you use scripts ‘This.MenuID’
The ITEM attribute of a menu is an array and contains one element for each of the menu bar item
Disabling a menu item will not affect the toolbar icon
What is the event from which I can see the exact SQL statement that is being sent to the database by PowerBuilder?
None of the all answer
UpdateStart event of the DataWindow control.
RetrieveStart event of the DataWindow control.
SQLPreview event of the DataWindow control.
What is the maximum characters number in PowerBuilder variables or objects identifier names?
When the connectionbegin event of an application object is fired?
None of the all answers
In Both Client & Server Applications
Server Application Only
Client Application Only
Relate to Menu Object , A menu item toolbar icons, which answer correct?
You can’t associate more than one toolbar icon to a menu item
can have two toolbar icons one icon is for default display and another is when the mouse button is depressed
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
can have two toolbar icons, one to display when the menu item is displayed, and another is when the menu bar item is hidden
Use SignalError() function in Pb Scripts will be
Checks for any error signals
Populates the Error object
Fires Application SystemError event
Called from the SystemError event to indicate the error processing is about to begin
Which function refreshes the Datawindow automatically at a certain intervals?
None of all the answers
Set the DataWindow Timer property
Return the refresh interval from the DataWindow
What’s the result of the program?
It’s a infinite loop,No result.
1 -> 3 -> 5 -> 7 -> 9
1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10
2 -> 4 -> 6 -> 8 -> 10
Which one isn’t DataWindow’s format?
An array is Interger c [ ], then LowerBound( c ) will return value ?
PowerBuilder dynamic SQL, please fill in the correct
script in the brackets (__).
OPEN SQLSA cursor_base USING:ls_Filter;
OPEN DYNAMIC SQLSA cursor_base USING:ls_Filter;
OPEN cursor_base USING:ls_Filter;
OPEN DYNAMIC cursor_base USING:ls_Filter;
How objects inherit after the call ue_even Ue_even ancestor object code?
Which option should be used to execute a SQL statement that does not produce a result set and does not require input parameters?
OPEN DYNAMIC my_cursor using :variable;
PREPARE SQLSA FROM sqlstatement;
EXECUTE SQLSA USING :variable ;
EXECUTE IMMEDIATE sqlstatement;
A PowerBuilder application must have an object that is?
The following syntax error that triggers the clicked event of the cb_1 button is
cb_1.trigger event static clicked()
Which of the following can be inherited?
Which of the following different datawindow display types has both data maintenance and report display capabilities?
Which answers of the array declaration is correct?
integer li_RunRate[1 to 5, 10 to 25]
integer li_count[10 to 5]
string ls_name[-10 to 15]
Which of the following arguments about PB function or event is on the right ( ).
The Reference parameters passed, its value in the function or event cannot be Modified
The Reference parameters passed, its value can be modified in the function or Event
The value passed parameters, its value can be modified in the function or event
Readonly parameters passed, its value in the function or event cannot be modified
How to trigger the ue_event event?
This.post event ue_event()
About powerbuilder “protect”? , which options are true?
when protect = 0 , it means column become
when protect = 1 , it means column? become enabled
when protect = 1 , it means column? become unenabled
when protect = 0 , it means column become enabled
Which functions EXIST on the DataStore object?
Execute the following PB script, which the result is
Filter() function on a non-updatable Datawindow dw_1 filtered out 12 rows out of 100 rows. Which the answer of function dw_1.FilteredCount() returns？
The following PB scripts. What return results same (a -= b+4) ? Int a , b a=0 b=10
a = a – (b+4)
a = – (b+4)
a = (b+4) -a
a = 1/(b+4)
What all functions fire on calling update function?
What are different statuses that a column can have in a DataWindow?
Note: Maybe the answers are not correct, you should check again