Multiple-Choice Questions About Powerbuilder
Which of the following variable equals 10?
real a = 10
double a = 10.0001
decimal a = 10.09
long a= 10.3
int a = 9.5
Which of the options are available in crosstab?
Stored Procedure Update
Suppress Repeating values
which can inherit?
How many nested datawindows a datawindow contain?
Execute ret = messagebox(“question”, “save”, question!, yesnocancel!, 3) Show the messagebox then choose the No button!Which ret result is correct?
Which are PowerBuilder message object’s properties?
When you enter data in the DataWindow column, Which of following events will written data in DWBuffer
Datawindow lose focus
Click on other column
Execute acceptText Method
Press the tab key
Press the enter key
The following four options are the TreeView control event, which is what “when the user drags an object and into a control event”?
A column use EDIT MASK and Display format at the same time. What is the correct 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
In the window, there Is a DataWindow, Name Of dw_1, there
are five Data Now, after executing the following code,
above are not
Which datawindow styles can used for data mantaining and view report?
Choose the correct answers which are valid reasons for using DataStores?
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
String string_now, org_string, col_ary
21. Try Catch (Throwable th) Catch (Exception ex) End try What would happen when compiling the above code?
Error: Catch statement unreachable. Ancestor (or same type) is caught in previous statement
Error: Undefined variable: th, ex
Error: Illegal data type: Throwable, Exception
Which of the following is correct about aggregate functions?
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
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!
Use updateblob to modify BLOB Data in PB, how to correctly judge is successful or not?
SQLCODE = 0
SQLNRows = 0
SQLCODE > 0
SQLNRows > 0
DataWindow, the difference between the view and the data table, the following is not the correct description of what?
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
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?
Integer li_count,i = 0,j = 5
How many system table of PowerBuilder ?
Application Object ConnectionBegin is fired when the connection begin in
None of the above
In Both Client & Server Applications
Server Application Only
Client Application Only
Related to Idle function,Please select the correct description
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
Related to Application object,Please select the correct description
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
Variables declared in the Application Object are:
None of the above
local to the event in which the variable is declared
global by default
private to the application object
What is the pronoun used to refer to the ancestor from a descendent?
What is the maximum number of letters an identifier in PowerBuilder can have?
Related to Menu Item,Please select the correct description
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
What pronouns use to reduce hard-coding ?
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
What are valid menu event?
What of the following statement are false?
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.
In a SingleLineEdit control, when is the modified event fires ? Please select the wrong description
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
What of the following description are true?
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
You can call procedure in PB by?
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
What values any sql will return?
how to do specify the start-up window name in appliaction object?
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
Application’s Open has the following script，What will happen ?
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
How do you pass a value to a window at opening time?
In the inheritence hirerachy, How PowerBuilder search for a function?
Any of the above is correct
What are attribute/method protection available in PowerBuilder?
HALT statement, What is the result?
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.
Which of the following adds a new menu item to the existing menu?
None of the above.
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’
What will happen if you call This.ParentWindow() in a window’s script?
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.
What should I do if I want to issue multiple PowerScripts commands in one line?
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.
When connecting to the SQL AnyWhere database, which one of the following is wrong?
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.
Which one of the following is true?
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.
Which statement is true when writing a cursor FOR loop ?
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
PB Scripts as WindowName.WorkSpaceHeight() which will be returns ?
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.
In PB, How do you refer to the host variable in an embedded SQL
Prefix the variable with pound sign
Prefix the variable with double colon
Prefix the variable with colon
The UPDATE statement in an embedded SQL script did not update any row. What’s returned value of SQLCODE?
What you can do with DataWindow object properties at runtime?
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
Related to FileReadEx function of PB,what description are true ?
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.
What below subqueries are work?
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);
What statements about views are true ?
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
Relate to Powerbuilder ,What features of PB called object-oriented programming language ?
None of all the answers
How many Dynamic SQL formats are available in PowerBuilder?
Dynamic SQL is not supported by PowerBuilder
How to set the datawindow column, the user can not edit?
Visible is 1
Protect is 1
TabSequence is 0
set DisplayOnly is Yes when the column has the edit style
You have deleted 10 rows from a non-updatable Datawindow dw_1. Which would be return value of dw_1.DeletedCount()?
Can’t call DeletedCount() for nonupdatable DataWindow
Have 2 window ‘a’ is parent window, ‘b’ is child window. What window type of window ‘b’ can be moved out of parent window?
What are the strongest usefully function points of using datawindow control ?
What datatypes can passed by a argument in the Message object ?
Which Data Type will store a signed floating point number with a 6 digits of precision?
About PB SignalError() function, which answer in right?
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.
A Datawindow has two OLE Database BLOB objects. How many times you need to call Update() function to update the whole Datawindow?
A Datawindow with multiple OLE Database BLOBs is not updatable
Three times. Once for the DataWindow and one time for each OLE Database BLOB.
About print a Datawindow rows data, Which answer is right?
DataWindowControlName.Print( BooleanValue )
DataWindowControlName.Print( StartRowNoToPrint, EndRowNoToPrint )
DataWindowControlName.Print( PrinterName )
DataWindowControlName.Retrieve() > PrinterName
How do you assign the transaction object to the datawindow control?
What are the ways to close your application?
What files type can use Importfile method to import file to datawindow ?
Datawindow dw_1 and dw_2 is sharedata relation, what functions will infulence dw_1 and dw_2 at the same time ?
In a six level deep FOR loop, where the EXIT statement in the sixth level brings the control to ?
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.
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
Scripts is error
What happens when you hide a MenuItem
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.
Related to Array ,what statements is wrong ?
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
What methods supported for Application object?
Related to function FileRead of PB, What describes are correct ?
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
Which language is used to develop PowerBuilder soft?
What Pipeline data sources, don’t allow multiple table joins?
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.
Which one of the following is not a valid window event?
Constructor (of dw)
There are the following PB script,which the result of execution is correct ? select substr(‘abcdcba’,instr(‘abcdcba’,’c’)) Into ls_str from Dual;
Scripts is error
When the Datawindow use RetrieveStart event, Return 2. Which of the following describes is correct?
update the rows and buffers before retrieving data
Do not reset the rows and buffers before retrieving data
Do not perform the retrieval
Three-tiered development datawindow use to access data function Getfullstate () whose role is?
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
Which of the PowerBuilder external Interact ?
Which of the PowerBuilder provides DataWindow buffer?
When the user presses the Tab key , Tab Order will decide the order to move the focus
Tab Order can be set a negative number
Maximum four digits
Tab Order is 0 you can not keying data
Which a event isn’t dataiwndow valid event ?
When you declare an instance variable with public access at a menu, that variable can be accessed from:
the menu and the active sheet
the parent window and the MDI window
the parent window only
any open sheet in the MDI application
Which of the following can not be inherited ?
When a general error occurs at run-time and the Application SystemError event has no script:
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
Which of the following description events in a DataWindow control are wrongs?
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
Which one of the following is not a valid menu event?
Which events may be executed after running a DataWindow’s Retrieve()?
Use PB10 to create datawindow ,what kinds of data sources is correct?
Which of the following statements are corrects?
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
When data in Datawindow is changed , which of following
steps for Datawindow validation rule
is correct ?
Which of the following Events will be executed at open window object?
Which of the following events is not under the control of Datawindow?
What will happen if you pass no arguments to the DataWindow’s Retrieve() function, when the DataWindow is expecting some arguments?
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
What kind of DataWindows are not updatable?
Tabular presentation styles
OLE presentation styles
Crosstab presentation styles
Composite presentation styles
What function don’t changes the current row?
Note: Maybe the answers are not correct, you should check again