Multiple-Choice Questions About Powerbuilder
Question: 1 | Which of the following variable equals 10? |
Answer | real a = 10 |
double a = 10.0001 | |
decimal a = 10.09 | |
long a= 10.3 | |
int a = 9.5 | |
Question: 2 | Which of the options are available in crosstab? |
Answer | Stored Procedure Update |
Update properties | |
Retrieve options | |
Suppress Repeating values | |
Question: 3 | which can inherit? |
Answer | Datawindow object |
Menu | |
User objects | |
Structure | |
Question: 4 | How many nested datawindows a datawindow contain? |
Answer | No Limitation |
32547 | |
1 | |
99 | |
Question: 5 | Execute ret = messagebox(“question”, “save”, question!, yesnocancel!, 3) Show the messagebox then choose the No button!Which ret result is correct? |
Answer | 0 |
3 | |
1 | |
2 | |
Question: 6 | Which are PowerBuilder message object’s properties? |
Answer | DoubleParm |
NumberParm | |
String Parm | |
Powerobjectparm | |
Question: 7 | When you enter data in the DataWindow column, Which of following events will written data in DWBuffer |
Answer | Datawindow lose focus |
Click on other column | |
Execute acceptText Method | |
Press the tab key | |
Press the enter key | |
Question: 8 | The following four options are the TreeView control event, which is what “when the user drags an object and into a control event”? |
Answer | DragDrop |
DragEnter | |
Dragwithin | |
DragLeave | |
Question: 9 | A column use EDIT MASK and Display format at the same time. What is the correct answer? |
Answer | It will display any effect |
It will both display EDIT MASK and Display Format | |
It will display the EDIT MASK not Display Format | |
It will display the Display Format not EDIT MASK | |
Question: 10 | In the window, there Is a DataWindow, Name Of dw_1, there
are five Data Now, after executing the following code, |
Answer | above are not |
4 | |
2 | |
3 | |
Question: 11 | Which datawindow styles can used for data mantaining and view report? |
Answer | Composite |
Nup | |
Rich Text | |
Group | |
Question: 12 | Choose the correct answers which are valid reasons for using DataStores? |
Answer | Perform database access on the user computer |
To perform multi-table updates which are not supported by the Datawindow | |
As part of a strategy to partition business logic from the user interface | |
To Retrieve, store and mainpulate data that does not need a visual representation | |
Question: 13 | String string_now, org_string, col_ary[] |
Answer | 3 |
1 | |
Null | |
0 | |
Question: 14 | 21. Try Catch (Throwable th) Catch (Exception ex) End try What would happen when compiling the above code? |
Answer | Compiles normally |
Error: Catch statement unreachable. Ancestor (or same type) is caught in previous statement | |
Error: Undefined variable: th, ex | |
Error: Illegal data type: Throwable, Exception | |
Question: 15 | Which of the following is correct about aggregate functions? |
Answer | None of the above |
Count(column) include null result | |
Sum(column), To increase the total, data can use number, string or date | |
Count(column) and count(*) , If the different number of canculated, there maybe a null result | |
Question: 16 | dw_1 has 4 rows’Status Flag as below, after execute dw_1.update(), which row will create SQL Scrip to DB? Row Column Status Row Status ——— —————- ————- 1 NotModified! NotModified! 2 DataModified! DataModified! 3 NotModified! New! 4 NewModified! NewModified! |
Answer | Row 4 |
Row 3 | |
Row 1 | |
Row 2 | |
Question: 17 | Use updateblob to modify BLOB Data in PB, how to correctly judge is successful or not? |
Answer | SQLCODE = 0 |
SQLNRows = 0 | |
SQLCODE > 0 | |
SQLNRows > 0 | |
Question: 18 | DataWindow, the difference between the view and the data table, the following is not the correct description of what? |
Answer | You can only retrieve add, and delete records in the view without modifying the data |
Can only add records in the view and cannot modify the data | |
Can ony retrieve in a view without adding, deleting, and modifying data | |
Can only retrieve and delete records in the view without adding and modifying data | |
Question: 19 | The remove a range of rows in a DataWindow control. Once a row has been removed using it code, you cannot restore the row. You have to retrieve it again from database. Which fuction can achieve the above mentioned function? |
Answer | RowDiscard |
RowsCopy | |
RowsMove | |
RowCount | |
Question: 20 | Integer li_count,i = 0,j = 5 |
Answer | 9 |
14 | |
10 | |
6 | |
Question: 21 | How many system table of PowerBuilder ? |
Answer | 7 |
5 | |
1 | |
3 | |
Question: 22 | Application Object ConnectionBegin is fired when the connection begin in |
Answer | None of the above |
In Both Client & Server Applications | |
Server Application Only | |
Client Application Only | |
Question: 23 | Related to Idle function,Please select the correct description |
Answer | None of the above |
Fires the Application object Idle event after the specified number of seconds | |
Fires the Application object Idle event after the specified number of minutes | |
Checks whether the application is idle and returns True/False value | |
Question: 24 | Related to Application object,Please select the correct description |
Answer | None of the above |
You can declare only Public functions at the application object | |
You can inherit application object only once per application | |
You can limit the number of times an application can instantiate | |
Question: 25 | Variables declared in the Application Object are: |
Answer | None of the above |
local to the event in which the variable is declared | |
global by default | |
private to the application object | |
Question: 26 | What is the pronoun used to refer to the ancestor from a descendent? |
Answer | This |
Parentwindow | |
Parent | |
Super | |
Question: 27 | What is the maximum number of letters an identifier in PowerBuilder can have? |
Answer | 40 |
30 | |
10 | |
20 | |
Question: 28 | Related to Menu Item,Please select the correct description |
Answer | You can’t associate more than one toolbar icon to a menu item |
two toolbar icons one icon is for default display and another is when the mouse button is depressed. | |
two toolbar icons, one to display when the menu bar item is enabled, and another is when the menu bar item is disabled | |
Question: 29 | What pronouns use to reduce hard-coding ? |
Answer | PARENTWINDOW |
SUPPER | |
THIS | |
PARENT | |
Question: 30 | The mode in which you open a file determines the behavior of the functions used to read and write to a file . In all modes, PowerBuilder can read |
Answer | UTF-8 files |
UTF-32 files | |
ANSI files | |
UTF-16 files | |
Question: 31 | What are valid menu event? |
Answer | Selected |
Help | |
Clicked | |
DragLeave | |
Question: 32 | What of the following statement are false? |
Answer | A Window control can be dragged and dropped only within the same window |
A window control can be dragged and dropped on another window | |
You can drag any non-sheet window and drop it on the Operating System icons such as Printer, Mailbox | |
A Window control can be dragged and dropped only within the same window with one exception, It applies to only those controls that are inherited from the DragObject object. | |
Question: 33 | In a SingleLineEdit control, when is the modified event fires ? Please select the wrong description |
Answer | SingleLineEdit doesn’t have Modified event. It has EditChanged event |
The content of the control is emptied out | |
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 | |
Question: 34 | What of the following description are true? |
Answer | Multiple statements on one line is not supported in PowerScript |
You can write as long as the commands in each blocks are separated by a semicolon and each block is enclosed in curly brackets | |
You can write IF…ELSE statement in one line. | |
You need to separate each command with a semicolon to issue multiple PowerScripts commands in one line | |
Question: 35 | You can call procedure in PB by? |
Answer | using C++ call through the transaction object |
using RPC call through the transaction object | |
through the embedded sql | |
through the procedure datasource for making datawindow objects | |
Question: 36 | What values any sql will return? |
Answer | Sqlerrtext |
Sqlnrows | |
Sqlcode | |
SQLDA | |
Question: 37 | how to do specify the start-up window name in appliaction object? |
Answer | Any of the above is correct |
by calling the Open() function in the Application Object Open event. | |
by calling the Open() function in the Application Object Constructor event | |
in the application object’s properties dialogbox at the design-time | |
Question: 38 | Application’s Open has the following script,What will happen ? |
Answer | The above script is wrong. You can’t write anything other than the Open() function in the application’s Open event. |
Application keep waiting till ‘Halt’ or ‘Halt with Close’ statement. | |
PowerBuilder stops the application as soon as the above script execution completes. | |
Application keep waiting till it encounters Exit() function | |
Question: 39 | How do you pass a value to a window at opening time? |
Answer | Use Open() |
Use OpenTab() | |
use OpenChannel() | |
Use OpenWithParm() | |
Question: 40 | In the inheritence hirerachy, How PowerBuilder search for a function? |
Answer | Any of the above is correct |
Bottom-to-Top | |
Top-to-Bottom | |
Randomize | |
Question: 41 | What are attribute/method protection available in PowerBuilder? |
Answer | Readonly |
ProtectedWrite | |
Protected | |
PrivateRead | |
Question: 42 | HALT statement, What is the result? |
Answer | Stops taking input from the user till the specified time. |
Closes the application, but executes the Application Close event. | |
There is no HALT statement in PowerBuilder. We have STOP statement. | |
Hangs the application. | |
Closes the application. | |
Question: 43 | Which of the following adds a new menu item to the existing menu? |
Answer | None of the above. |
MenuObjectName.NewMenuItem(…) | |
Find the upperbound of the ITEM[] and add one more element to the ITEM[] array and populate value and call MenuObjectName.Refresh | |
ADD MENUITEM ‘ItemName’ ‘ItemText’ | |
APPEND MENUITEM ‘ItemName’ ‘ItemText’ | |
Question: 44 | What will happen if you call This.ParentWindow() in a window’s script? |
Answer | None of the above. |
You can only call the ParentWindow() function from a menu item 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. | |
Question: 45 | What should I do if I want to issue multiple PowerScripts commands in one line? |
Answer | Multiple statements on one line is not supported in PowerScript |
you need to separate each command with double hyphens. | |
you need to separate each command with a colon. | |
Yyou need to separate each command with a semicolon. | |
Question: 46 | When connecting to the SQL AnyWhere database, which one of the following is wrong? |
Answer | You need to populate SQLCA.UserID and SQLCA.LogID |
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 should populate SQLCA.UserID with the user name. | |
You should populate SQLCA.LogID with the user name. | |
Question: 47 | Which one of the following is true? |
Answer | You can’t send a DataWindow as a parameter to the PB server application. You need to use structures instead. |
PB Server application can use only OLE Presentation style datawindows. | |
DataWindows with RichTextEdit presentation style can’t be used on the PB Server application. | |
Only ‘Read-only’ datawindows can be used on the PB Server application. | |
Question: 48 | Which statement is true when writing a cursor FOR loop ? |
Answer | You must explicitly declare the record variable that holds the row returned from the cursor |
You do not need explicitly open and close a cursor within a cursor FOR loop | |
You must explicitly open the cursor prior to the cursor FOR loop | |
You must explicitly close the cursor prior to the end of program | |
Question: 49 | PB Scripts as WindowName.WorkSpaceHeight() which will be returns ? |
Answer | The total height of the specified window minus the border height. |
The total height of the specified window height. | |
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 height. | |
Question: 50 | In PB, How do you refer to the host variable in an embedded SQL |
Answer | Prefix the variable with pound sign |
Prefix the variable with double colon | |
Prefix the variable with colon | |
Question: 51 | The UPDATE statement in an embedded SQL script did not update any row. What’s returned value of SQLCODE? |
Answer | Null |
raise erro | |
0 | |
-1 | |
Question: 52 | What you can do with DataWindow object properties at runtime? |
Answer | Stop program at runtime by property change in code |
Get the value of the property at runtime in code | |
Change the value of the property at runtime in code | |
Specify the value of the property at runtime based on an expression defined for the control | |
Question: 53 | Related to FileReadEx function of PB,what description are true ? |
Answer | if the file being read contains null characters, FileReadEx stops reading at the first null character |
FileReadEx can read files with AL32UTF8 encoding. | |
If the file is an ANSI or UTF-8 file and is read into a string, FileReadEx converts the text to Unicode before saving it in the string variable. | |
If the file is an ANSI or UTF-8 file and is read into a blob, FileReadEx saves the contents of the file with no conversion. | |
Question: 54 | What below subqueries are work? |
Answer | Select distinct dept_id from emp where sal > ALL (select AVG(sal) from emp Group By dept_id); |
Select dept_id from emp Where sal > all(select AVG(sal) from emp group by AVG(sal)); | |
Select * From emp where sal> (select min(sal) from emp group by dept_id); | |
Select distinct dept_id from emp where sal > ANY (select AVG(sal) from emp Group By dept_id); | |
Question: 55 | What statements about views are true ? |
Answer | A view must have aliases defined for the column names in the SELECT statement |
A view can be created as a join on two or more tables | |
A view can be created as read only | |
A view can not have an ORDER BY clause in the SELECT statement | |
Question: 56 | Relate to Powerbuilder ,What features of PB called object-oriented programming language ? |
Answer | None of all the answers |
Polymorphism | |
inheritance | |
Encapsulation | |
Question: 57 | How many Dynamic SQL formats are available in PowerBuilder? |
Answer | Dynamic SQL is not supported by PowerBuilder |
6 | |
2 | |
4 | |
Question: 58 | How to set the datawindow column, the user can not edit? |
Answer | Visible is 1 |
Protect is 1 | |
TabSequence is 0 | |
set DisplayOnly is Yes when the column has the edit style | |
Question: 59 | You have deleted 10 rows from a non-updatable Datawindow dw_1. Which would be return value of dw_1.DeletedCount()? |
Answer | Can’t call DeletedCount() for nonupdatable DataWindow |
0 | |
Null | |
10 | |
Question: 60 | Have 2 window ‘a’ is parent window, ‘b’ is child window. What window type of window ‘b’ can be moved out of parent window? |
Answer | Child |
Response | |
Main | |
Popup | |
Question: 61 | What are the strongest usefully function points of using datawindow control ? |
Answer | Update database |
Reporting | |
Displaying data | |
Manipulate data | |
Question: 62 | What datatypes can passed by a argument in the Message object ? |
Answer | Rowtype |
PowerObject | |
String | |
Numeric | |
Question: 63 | Which Data Type will store a signed floating point number with a 6 digits of precision? |
Answer | Integer |
Float | |
Double | |
Real | |
Question: 64 | About PB SignalError() function, which answer in right? |
Answer | Causes a SystemError event at the application level. |
Populates information for the Error objects’s . | |
Called from the SystemError event to indicate the error processing is about to begin. | |
Catch the any exception error events. | |
Question: 65 | A Datawindow has two OLE Database BLOB objects. How many times you need to call Update() function to update the whole Datawindow? |
Answer | A Datawindow with multiple OLE Database BLOBs is not updatable |
Three times. Once for the DataWindow and one time for each OLE Database BLOB. | |
Once | |
Twice | |
Question: 66 | About print a Datawindow rows data, Which answer is right? |
Answer | DataWindowControlName.Print( BooleanValue ) |
DataWindowControlName.Print( StartRowNoToPrint, EndRowNoToPrint ) | |
DataWindowControlName.Print( PrinterName ) | |
DataWindowControlName.Retrieve() > PrinterName | |
Question: 67 | How do you assign the transaction object to the datawindow control? |
Answer | SETTRANSOBJECT() |
SetAction() | |
SetChanges() | |
SETTRANS() | |
Question: 68 | What are the ways to close your application? |
Answer | Close |
Halt Close | |
Halt | |
Exit | |
Question: 69 | What files type can use Importfile method to import file to datawindow ? |
Answer | CSV! |
Text! | |
EXCEL! | |
XML! | |
Question: 70 | Datawindow dw_1 and dw_2 is sharedata relation, what functions will infulence dw_1 and dw_2 at the same time ? |
Answer | ScrolltoRow() |
Retrieve() | |
Insertrow() | |
Importfile() | |
Question: 71 | In a six level deep FOR loop, where the EXIT statement in the sixth level brings the control to ? |
Answer | You should specify the loop number in the EXIT statement as: EXIT LOOP_NUMBER. |
EXIT statement exits the current event/function. You should use EXITLOOP statement. | |
Fifth level | |
Question: 72 | After executed of the following script, What would be the value of ls_Dummy1? String ls_Dummy1 SetNull( ls_Dummy1 ) ls_Dummy1=’Hello’ ls_Dummy1=Null |
Answer | Space |
Scripts is error | |
Null | |
“” | |
Question: 73 | What happens when you hide a MenuItem |
Answer | Toolbar is visible and user can not click on the toolbar icon. |
Toolbar is hidden and user can not click on the toolbar icon. | |
Toolbar is hidden automatically. | |
Toolbar is visible and user can click on the toolbar icon. | |
Question: 74 | Related to Array ,what statements is wrong ? |
Answer | multidimensional arrays always have a fixed size |
you can’t declare a unbound array in PowerBuilder | |
you can declare a unbound array in PowerBuilder | |
PowerScript don’t support multi-dimentional array | |
Question: 75 | What methods supported for Application object? |
Answer | Resize() |
CloseQuery() | |
Open() | |
connectionbegin() | |
Question: 76 | Related to function FileRead of PB, What describes are correct ? |
Answer | if the file being read contains null characters, FileRead stops reading at the first null character, interpreting it as the end of the file. |
If the file was opened in text mode, FileRead returns 1 | |
FileRead can read files with ANSI, UTF-8, UTF-16LE, and UTF-16BE encoding. | |
FileRead can read a maximum of 32,765 bytes at a time | |
Question: 77 | Which language is used to develop PowerBuilder soft? |
Answer | Pascal |
C++ | |
C | |
Java | |
Question: 78 | What Pipeline data sources, don’t allow multiple table joins? |
Answer | Have a SELECT statement with a SUB-SELECT statement as a DataSource |
Have a multi-table join SELECT statement as a DataSource | |
Have a Stored Procedure as a DataSource | |
Have a SELECT statement on a VIEW as a DataSource. | |
Question: 79 | Which one of the following is not a valid window event? |
Answer | timer |
other | |
Constructor (of dw) | |
key | |
Question: 80 | There are the following PB script,which the result of execution is correct ? select substr(‘abcdcba’,instr(‘abcdcba’,’c’)) Into ls_str from Dual; |
Answer | Scripts is error |
cdcba | |
c | |
cba | |
Question: 81 | When the Datawindow use RetrieveStart event, Return 2. Which of the following describes is correct? |
Answer | update the rows and buffers before retrieving data |
Do not reset the rows and buffers before retrieving data | |
Continue processing(retrieve) | |
Do not perform the retrieval | |
Question: 82 | Three-tiered development datawindow use to access data function Getfullstate () whose role is? |
Answer | Use datawindow change value, into datastore |
Remove datawindow change made in (add, delete, modify) data | |
Remove the data in the datastore | |
The data stream into datawindow | |
Question: 83 | Which of the PowerBuilder external Interact ? |
Answer | OCX |
OLE | |
WIN API | |
Servlet | |
Question: 84 | Which of the PowerBuilder provides DataWindow buffer? |
Answer | Original Buffer |
Modify Buffer | |
Primary Buffer | |
Filter Buffer | |
Question: 85 | When the user presses the Tab key , Tab Order will decide the order to move the focus |
Answer | Tab Order can be set a negative number |
Maximum four digits | |
Tab Order is 0 you can not keying data | |
Question: 86 | Which a event isn’t dataiwndow valid event ? |
Answer | updatestart() |
savestart() | |
Retrievestart() | |
other() | |
Question: 87 | When you declare an instance variable with public access at a menu, that variable can be accessed from: |
Answer | the menu and the active sheet |
the parent window and the MDI window | |
the parent window only | |
any open sheet in the MDI application | |
Question: 88 | Which of the following can not be inherited ? |
Answer | DataWindow Object |
Menu | |
User Object | |
Window | |
Question: 89 | When a general error occurs at run-time and the Application SystemError event has no script: |
Answer | logs the error informaton to a log file and continues application execution without displaying the error. |
you can’t run a PowerBuilder application without writing script to the SystemError event. | |
PowerBuilder displays error information and stops the application | |
PowerBuilder displays the error and allows the user to choose to continue/stop the application | |
Question: 90 | Which of the following description events in a DataWindow control are wrongs? |
Answer | For database errors,If you do not code to DbError event, it will fire Application SystemError event |
For database errors , if you do not write any code in DBError event, PowerBuilder displays the error in its own dialog box | |
DbError event is fired when a database related error occurs | |
When a wrong expression is encountered in the .Object notation or a OLE/OCX related error occurs ,if you do not code to DataWindow ERROR event, it will fire Application SystemError event. If there is no code in that event, PowerBuilder displays the error message and without terminates the application | |
Question: 91 | Which one of the following is not a valid menu event? |
Answer | Help |
MouseButtonDown | |
Clicked | |
Selected | |
Question: 92 | Which events may be executed after running a DataWindow’s Retrieve()? |
Answer | RetrieveStart |
DBError | |
RetrieveEnd | |
RetrieveRow | |
Question: 93 | Use PB10 to create datawindow ,what kinds of data sources is correct? |
Answer | Web Service |
Query | |
Quick Select | |
Stored Procedure | |
Question: 94 | Which of the following statements are corrects? |
Answer | When TriggerEvent() method execution success , the return value will be true |
When PostEvent() method execution success , the return value will be 1 | |
TriggerEvent() method represents which executes the script for that event immediately | |
PostEvent() method can add an event to the end of the event queue of an object | |
Question: 95 | When data in Datawindow is changed , which of following
steps for Datawindow validation rule
is correct ? |
Answer | 1==>4==>3==>2 |
1==>4==>2==>3 | |
1==>2==>3==>4 | |
1==>3==>4==>2 | |
Question: 96 | Which of the following Events will be executed at open window object? |
Answer | Activate Event |
Rezise Event | |
Deactivate Event | |
Timer Event | |
Question: 97 | Which of the following events is not under the control of Datawindow? |
Answer | updatestart() |
savestart() | |
retrievestart() | |
other() | |
Question: 98 | What will happen if you pass no arguments to the DataWindow’s Retrieve() function, when the DataWindow is expecting some arguments? |
Answer | None of the all answer |
The datawindow will retrieve data but show not enough data | |
PowerBuilder prompts you for the arguments at run-time. | |
PowerBuilder raise error and close application | |
Question: 99 | What kind of DataWindows are not updatable? |
Answer | Tabular presentation styles |
OLE presentation styles | |
Crosstab presentation styles | |
Composite presentation styles | |
Question: 100 | What function don’t changes the current row? |
Answer | Scroll() |
RowsMove() | |
Selectrow() | |
ScrollToRow() |
Note: Maybe the answers are not correct, you should check again
Good Luck!