April 3, 2021

Multiple-Choice Questions About Powerbuilder Part 7

Multiple-Choice Questions About Powerbuilder

Question: 601

PB. Which the following type is not functions for datawindow control

Answer

SetRedDraw

Move

Print

Title

Question: 602

PB. what answer of below define  is correct for CloseQuery in window?

Answer

Occur when close the window, before Close event

Occur when close the window, after Save event

Occur when close the window, before Save event

Occur when close the window, after Close event

Question: 603

PB. This script, what answer Of below Is correct For Sum?

Int i,j,k, Sum
For i = 1 To 100 Step 5
For j = 1 To 50
For k = 1 To 200
Next
Next
Sum = i+j+k
Next

Answer

483

834

438

348

Question: 604

PB. This script, what answer Of below Is correct?)

Integer i,j
For i = 1 To 3
For j = 1 To 2
MessageBox(”,i)
Exit
Next
Continue
Next

Answer

1->1->1

1->2

1

1->2->3

Question: 605

PB. This script, what answer of below is correct for ls_str?) String ls_str SELECT SUBSTR(‘abcdcba’, INSTR(‘abcdcba’,’c’)) INTO :ls_str  FROM DUAL ; messagebox(‘tb’, ls_str)

Answer

Code be error

cdcba

c

cba

Question: 606

PB. What the following type is properties for DropDownListBox control

Answer

InsertItem

Modified

AllowEdit

DragDrop

Question: 607

PB. which is not Events for Window control?

Answer

MouseMove

Clicked

Resize

Title

Question: 608

Pb. Share Datawindow, which of the following function, when doing on the secondary window will not affect the main window?

Answer

InsertRow

SetItem

ImportClipboard

SetFilter

Question: 609

When writing code, we often use the messagebox function to display the prompt information, there are several arguments for the function at least?

Answer

3

2

0

1

Question: 610

PB. Which the following type is not properties for Message object?

Answer

GetParent

ClassDefinition

WordParm

ReturnValue

Question: 611

Which of the following is not a valid  PB variable name?

Answer

a$

parent

name

window

Question: 612

Which of the following window type can not have menu?

Answer

Main!

MDI!

Child!

Popup!

Question: 613

PB. The following script, Which is view “Hello” and “world”, but them  will be separated by 1 line?

Answer

messagebox(”, “Hello~nworld”)

messagebox(”, “Hello~rworld”)

messagebox(”, “Hello~r~rworld”)

messagebox(”, “Hello~r~nworld”)

Question: 614

When data does not match the datawindow validdation rules,the system show an error message.Which of the following events can cancel the error message ?

Answer

Constructor Event

ItemEdit Event

Itemfocuschanged Event

ItemError Event

Question: 615

Execute the following PB script,which the result of execution is correct ?  String ls_arr[] ls_arr[5] = ‘test’

Answer

Use function Upperbound(ls_arr) result is 4

Use function lowerbound(ls_arr) result is 0

ls_arr[3] is empty string

can use SetNull (ls_arr) function,Initialize the array

Question: 616

Declare dc_sel dynamic cursor for SQLSA; Prepare SQLSA from “select count(*) from dept where dept_no in (‘SA’,’SB’,’SC’)”; what is it?

Answer

For storage input and output parameter

For storage dynamic SQL statement

for connect database

Just a user defined name

Question: 617

Which SQL excute will get result ‘20150228’?

Answer

select to_char ( add_months(to_date(‘20141231′,’yyyymmdd’),2),’yyyymmdd’ ) from dual ;

select to_char ( add_months(to_date(‘20141230′,’yyyymmdd’),2),’yyyymmdd’ ) from dual ;

select to_char ( add_months(to_date(‘20141228′,’yyyymmdd’),2),’yyyymmdd’ ) from dual ;

select to_char ( add_months(to_date(‘20141229′,’yyyymmdd’),2),’yyyymmdd’ ) from dual ;

Question: 618

There is Data Pipeline Object,when executing Pipeline.start() which of following can be triggered ?

Answer

PipeEnd

Destructor

Constructor Event

PipeStart

Question: 619

Execute the following PB script,which the result of execution is correct ?

Integer i,j
For i = 1 To 3
For j = 1 To 2
MessageBox(”,i)
Exit
Next
Continue
Next

Answer

1==>1==>1

1==>2

1

1==>2==>3

Question: 620

Execute the following PB script,which the result of execution is correct ?

Integer i
For i = 1 To 3
For i = 1 To 2
MessageBox(”,i)
Next
Next

Answer

1==>2==>1==2==>1==>2

1==>2==>3==>1==>2==>3==>1==>2==>3

1==>2==>1==2==>…….Endless loop

1==>2

Question: 621

Declare variable in PB , which declare are wrong ?

Answer

string $123_%~nx

string $123_%nx

string 123_nx

string %123_nx

Question: 622

Related to function FileRead of PB,Which of the following describes is correct ?

Answer

FileRead return number of bytes read

FileRead don’t support Stream Mode

FileRead don’t support Text Mode

FileRead can read a maximum of 32,765 bytes at a time

Question: 623

Which of the following statements are DML ?

Answer

Truncate

Delete

Insert

Update

Question: 624

There are the following PB scripts. In PB ,which formula return result the same (a -= b+4) ?   Int a , b a=0 b=10

Answer

a = (b+4) -a

a = a – (b+4)

a = 1/(b+4)

a = – (b+4)

Question: 625

Which of the following statements is wrong in Powerbuilder ?

Answer

When you write events scripts in a descendent object ,you can cancel inheritance scripts that have been written in the ancestor

when you write events scripts in a descendent object ,you can extend or override scripts that have been written in the ancestor

Descendant can use ancestor’s functions

You can delete an ancestor function from within a descendant

Question: 626

When PowerBuilder executes a script and finds an unqualified reference to a variable, it searches for the variable in the following order :

Answer

Local variable ==>Shared variable==>Global variable ==>Instance variable

Global variable ==>Local variable ==>Shared variable==>Instance variable

Global variable==>Instance variable ==>Local variable ==>Shared variable

Local variable ==>Global variable ==>Shared variable==>Instance variable

Question: 627

About PB’s POS function , which answers are right?

Answer

Pos(“The Avengers”, “The”, 4 ) ==> Return 1

PosA(“The Avengers”, “av”) ==> Return 0

Pos(“The Avengers”, “e”) ==> Return 3

lastpos(“The Avengers”, “A”) ==> Return 5

Question: 628

There are the following PB scripts, please fill in correct _____ in order to save without errors _____abc

string ls_val
Int li_val
abc=ls_val
abc=li_val

Answer

Double

String

All

Any

Question: 629

There are the following PB scripts, What’s the resulting value e ? 

Integer a = 32000, b = 1000, c
Long e 
c = a + b
e = c

Answer

-32536

32000

33000

-233

Question: 630

There are the following PB scripts, What Is the result?

Integer li_count,i = 0,j = 5
For i = 1 To j
Do
li_count = li_count +1
Loop Until li_count > 5
Next
MessageBox(‘Result’,String(li_count))

Answer

6

5

9

10

Question: 631

Related to Taborder ,which statements is wrong ?

Answer

Maximum four digits

TabOrder can be set a negative number

When the user presses the Tab key , TabOrder will decide the order to move the focus

TabOrder is 0 you can not keying data

Question: 632

Which of the following SQL statement results are 100?

Answer

select trunc(145.567,-2) from dual;

select round(103.49,-1) from dual;

select ceil(100.01) from dual;

select ABS(-100) from dual;

Question: 633

Which one of the following is faster?

Answer

All of the above gives the same performance

Creating menu items dynamically as and when needed and destoring them when done

Enabling and Disabling a menu item

Hiding and Displaying a menu item

Question: 634

after Idle() function,Which explanation is correct?

Answer

Fires the Application object Idle event after the specified number of seconds

Makes the application idle and stops taking input from the user

PowerBuilder doesn’t have Idle() function

Fires the Application object Idle event after the specified number of minutes

Checks whether the application is idle and returns True/False value

Question: 635

SignalError() function,Which explanation is correct?

Answer

It is a wrong function. It should be ErrorSignal()

Checks for any error signals

Fires Application SystemError event

Called from the SystemError event to indicate the error processing is about to begin

Populates the Error object and fires Application SystemError event

Question: 636

How to specify the application start-up window name?

Answer

Any of the above is correct

in the application object’s properties dialogbox at the design-time

by turning the window’s StartupWindow property on at run-time

by calling the Open() function in the Application Object Constructor event

by calling the Open() function in the Application Object Open event

Question: 637

How many times the SQLPreview event is fired when you call dw_1.Retrieve()?

Answer

will not

once

Number of dw_1 total Rows

Currentl Rows of dw_1

Question: 638

Disable a MenuItem, what affect for the associated toolbar icon ?

Answer

display ‘X’ symbol in red color on the toolbar icon

not affect the toolbar icon

disable the associated toolbar icon

hide the associated toolbar icon

Question: 639

About the Toolbar Icons description, which is correct?

Answer

You can associate any number of toolbar icons to a menu item and control which one to display in the script

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

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

Question: 640

About ToolbarItem following properties, which is wrong?

Answer

ToolbarItemText

ToolbarItemName

ToolbarItemType

ToolbarItemOrder

Question: 641

Which one of the following refers to the associated menu from the Window’s Activate event?

Answer

None of the above

This.MenuID

This.MenuName

ParentMenu

This.Menu

Question: 642

If you want refresh a Datawindow automatically at a certain intervals, the following function which is the correct usage ?

Answer

Timer ( interval {, windowname } )

windowname.timer(interval)

DataWindow.Refresh(Interval)

Timer ( interval {, datawindow } )

Question: 643

WindowName.WorkSpaceHeight() returns:

Answer

There is no such function. The window has an attribute ‘WorkSpaceheight’ which you can refer directly.

The second option, but applies only for the MDI Frame/Help windows.

The second option, but doesn’t apply to a response window.

.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: 644

Which one of the following attribute a Response window can’t have?

Answer

Maximize & Minimize buttons

Control Menu

Title

Menu

Border

Question: 645

Which one of the following statement is wrong?

Answer

Option D is correct with one exception; It applies to only those controls that are inherited from the DragObject object.

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.

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.

Question: 646

The SQL statement for a Pipeline data source can, Multiple table joins are NOT allowed?

Answer

Option C with a maximum of 4 tables in the join.

Have a multi-table join SELECT statement as a DataSource.

Have a SELECT statement with a SUB-SELECT statement as a DataSource.

Have a Stored Procedure as a DataSource.

Have a SELECT statement on a VIEW as a DataSource.

Question: 647

A window event/function has the following script, what results are correct?  WINDOW lw_MyWindow lw_MyWindow = PARENTWINDOW

Answer

No matter where you code it, it will result in compilation error unless you call this on a MENU object.

Since, window doesn’t have a PARENT, it refers to the WINDOW itself in which it is called.

Refers to the associated WINDOW.

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.

Question: 648

Which of the following DataWindow control functions, Will affect the Original Buffer data of DataWindow dw_1?

Answer

dw_1.retrieve()

dw_1.filter()

dw_1.reset()

dw_1.delete()

Question: 649

To 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 the database. Which function can achieve the above mentioned function ?

Answer

RowCount

RowsDiscard

RowsCopy

RowsMove

Question: 650

Which of the following about OpenWithParm Function is wrong

Answer

Always save arguments in Message.PowerObjectParm Object Property

When Save PowerObject, it’s can support Structure Object

When Open Window, it will save arguments in Message Object

Can save Numeric DatatypeString DatatypePowerObject

Question: 651

Declared Array following PB script, What is ll_array[1,1] + ll_array[2,2]
Long ll_array[2,2] = {1,2,3,4}

Answer

7

5

1

3

Question: 652

When you enter data in the DataWindow dw_1 column, Which of following events will write data to dw_1 DWBuffer

Answer

Press the Enter key

Execute AcceptText Method

dw_1 lose focus

Press the Tab key

Click on other dw_1 column

Question: 653

Integer a = 32000, b = 1000, c
Long e 
c = a + b
e = c 

What’s the resulting value e?

Answer

-32536

33000

31000

32000

Question: 654

Which variable’s values is 10?

Answer

real a = 10

double a = 10.0001

decimal a = 10.09

long a = 10.3

int a = 9.5

Question: 655

Run below PB script, will Show up which MessageBox?

Try
Int li_count
Int li_test = 1
For li_count = 5 To 0 Step -5
li_test = li_test / li_count
Next
Catch ( nullobjecterror er_nuo )
MessageBox(“error”,”test1″)
Catch ( runtimeerror er )
MessageBox(“error”,”test2″)
Finally    MessageBox(“error”,”test3″)
End Try

Answer

show message test2 first, and show message test3

show message test1 first, and show message test3

show message test1

show message test2

Question: 656

When two DataWindow are being shared,which  following descriptions are correct?

Answer

Crosstab DataWindow windows can be share data

The sort criteria can be share

Share the data buffers( including Delete! and Filter!)

The shared datawindow controls do not share formatting; only the data is shared.

Question: 657

Powerbuilder provided by Debug, has what function?

Answer

Add program comment

Change the content of the program function.

Change the variable value of the stop point.

Adjust the program execution steps.

Question: 658

Which event is triggered only on first expansion of a TreeViewItem

Answer

ItemExpanded

ItemPopulate

ItemExpanding

ItemSelected

Question: 659

How to set the col_1 DataWindow field data does not show Repeating data ?

Answer

All of the above statement is right

SetFilter()

Rows -> Suppress Repeating Values -> col_1 DataWindow

dw_1.Modify(“DataWindow.Sparse=’col_1′”)

Question: 660

Datawindow only show which one buffer’s data?

Answer

filter buffer

delete buffer

primary buffer

original buffer

Question: 661

Which statements about using DataStore is true?

Answer

DataWindow objects are assigned to DataStores using the datastore.object.data property

DataWindow objects are assigned to DataStores using the datastore.dataobject property

The DataWindow object property can be copied from a DataWindow to a DataStore

DataWindow objects are assigned to DataStores using the datastore.object.dwo property

Question: 662

If string ls_a =’Helloword’ and string ls_b = MidA(ls_a,7,mod(10,LenA(ls_a)-2) ) , about string ls_b , which option is true?

Answer

ls_b=rd

ls_b=wor

ls_b=ord

ls_b=owo

Question: 663

Which of the following functions is used to determine the data on the DataWindow to be modified?

Answer

FilteredCount()

RowCount()

ModifiedCount()

DeletedCount()

Question: 664

How to close Timer Event ?

Answer

Timer(1)

Timer(0)

Timer(-1)

Timer(2)

Question: 665

Which are probably return values in ItemChanged Event?

Answer

3

2

NULL

1

Question: 666

String a ,array[3,3] = {‘‘,’‘,’▲’,’‘,’□’,’‘,’‘,’‘,’▼’}
Int i For i = 1 To 3
If Mod(i,2) = 1 Then
a = a + array[i,1]
ElseIf Mod(i,3) = 0 Then
a = a + array[i,3]
Else
a = a + array[i,2]
End If
Next

a = ?

Answer

□▼

□▲

Question: 667

Which PB scripts excute will get result ‘000’?

Answer

mid(‘0000’,2,3)

’00’ + Space (1)

string (111,’000′)

Fill( ‘0’, 3 )

Question: 668

There are two functions in a Window.  
(1) wf_operate(integer ai_val) returns integer{         return ai_val – 3  }
(2) wf_operate(string as_val) returns integer{         return Integer(as_val) * 2  } 

After PB executes wf_operate(‘5’), what it will return?

Answer

10

2

‘0’

‘2’

Question: 669

Which one Of Error will upon when Execute below script ?

Any la_value
Try
IsValid(la_value)
Catch ( dwruntimeerror erdw )
MessageBox( ‘Answer’, ‘A’)
Catch ( nullobjecterror er_nuo )
MessageBox( ‘Answer’, ‘B’)
Catch ( runtimeerror er )
MessageBox( ‘Answer’, ‘C ‘)
Finally
MessageBox( ‘Answer’, ‘D’)
End Try

Answer

D

C

A

B

Question: 670

Integer a[3,2] = {1,2,3,4,5,6} Integer b[4,4] b = a  In PowerScript,which answer is b[2,3] value?

Answer

6

5

0

4

Question: 671

What is the string variable ls_result’s value of below power builder script?  dec{2} amount string ls_result amount = 123456.32 ls_result = string(amount,”\N\T\D\ 0.00″)

Answer

\N\T\D 123456.32

NTD 123456.32

123456.32

\N\T\D123456.32

Question: 672

Which function can open a file that is more than 32767 bytes ?

Answer

FileReadEX

GetFileRead

Read

FileRead

Question: 673

Which of the following syntax is used to read the data using the Cursor.

Answer

DECLARE

FETCH

OPEN

CLOSE

Question: 674

PowerScript pronouns which provides correct?

Answer

super

parentwindow

this

parent

Question: 675

About PB Tab Order ,which statement is wrong ?

Answer

Maximum four digits

Tab Order can be set a negative number

When the user presses the Tab key , Tab Order will decide the order to move the focus

Tab Order is 0 you can not keying data

Question: 676

Which one of the  following controls does  the groupbox control   have an effect on ?

Answer

PictureButton

CheckBox

SingleLineEdit

RadioButton

Question: 677

Which of the following DataWindow’s Primary Buffer statuses will cause the DataWindow to generate SQL statements?

Answer

NewModified

New!

NotModified!

DataModified!

Question: 678

The following syntax error is: 

Answer

dw_1.Object.address.protect = no

dw_1.Object.address.Visible = ‘yes’

dw_1.Object.address.Visible = 1

dw_1.Object.address.Visible = False

Question: 679

Which of the following DataWindow control functions will cause database activity to occur?

Answer

Update()

DeleteRow()

SelectRow()

ReselectRow()

Question: 680

Which of the following functions are provided by PowerBuilder to calculate the rows of data?

Answer

FilteredCount()

RowCount()

ModifiedCount()

DeletedCount()

Question: 681

How can I find out if the PowerBuilder application is connected to the DB or not?

Answer

GetActiveSheet

GetApplication()

Sqlca.Sqlcode

Dbhandle()

Question: 682

What is the event from which I can see the exact SQL statement sent to the DB by PowerBuilder?

Answer

RetrieveEnd

DbError

SqlPreview

UpdateEnd

Question: 683

What would be the row status in the destination DataWindow when a row is copied from another DataWindow using RowsCopy() function?

Answer

DataModified!

NotModified!

New!

NewModified!

Question: 684

The Timer event of a window can be initialized with which function?

Answer

Timer()

Sleep()

Start()

Idle()

Question: 685

After inserting or modifying rows in a grouped DataWindow, what functions should be called to ensure proper display?

Answer

GetChanges() then Move()

FindCategory() then RowsMove()

SetSort() then Sort()

Sort() then GroupCalc()

Question: 686

Copy the data of dw_1 to dw_2, which options of the  following are true?

Answer

Dw_2.object.data = dw_1.object.data

blob lb_data long ll_row ll_row = dw_1.getfullstate(lb_data) dw_2.setfullstate(lb_data)

dw_1.rowscopy(1,dw_1.rowcount(),Primary!,dw_2,1,primary!)

dw_1.sharedata(dw_2)

Question: 687

Which of following command could escape loop from Powerbuilder?

Answer

continue

Go to

exit

end

Question: 688

FOR a=100 to 2 step  -2           
Next                                                                  

The number of times the cycle statement is executed?

Answer

98

51

48

50

Question: 689

To dynamically modify the font color in the text box st_1 PowerBuilder script, Which option is correct?

Answer

st_1.color = rgb(255,0,0)

st_1.text = 255

st_1.text = rgb(255,0,0)

st_1.textcolor = rgb(255,0,0)

Question: 690

How to run the application start-up window ?

Answer

Any of the above is correct

in the application object’s properties dialogbox at the design-time

by turning the window’s StartupWindow property on at run-time

by calling the Open() function in the Application Object Constructor event

by calling the Open() function in the Application Object Open event

Question: 691

Which setting of the retrieve options has a new row while scrolling?

Answer

Rows in needed

Rows on time

Rows as needed

Rows to disk

Question: 692

integer a,b=100 ,c
setnull(c)
a = b + c 

What’s the result of a?

Answer

-100

0

null

100

Question: 693

Which object can’t use Inheritance?

Answer

user object

menu

datawindow

window

Question: 694

about powerbuilder function Upper ( string ),which option is true

Answer

Upper(“Apple”) = Apple

Upper(“Apple”) = aPPLE

Upper(“Apple”) = apple

Upper(“Apple”) = APPLE

Question: 695

 Which method of invoking event is correct ?

Answer

this.triggerevent(eventcom)

this.event(‘eventcom’)

this.event  eventcom()

this.triggerevent  eventcom()

Question: 696

For Any type of account is wrong?

Answer

Use the function the ClassName () to get type of data saved in Any type variable

Any type variable can not change the data type in the second assignment

Any type of variables to participate in operations,,Must ensure that the data type of the value is correct and  meet operator requirements

Any type is a kind of variable data types

Question: 697

In the event of PB, what is the trigger condition of key events?

Answer

Occurs When the user presses a key

Occurs When the output specific characters

Occurs when the window becomes inactive.

Occurs When the input specific characters

Question: 698

In using TreeView object, which property can allow item to be dragged?

Answer

Indentation

DisableDragDrop

Hide Selection

Lines At Root

Question: 699

if we want to modify text color , where do we change the setting argument?

Answer

database

library

properties

browser

Question: 700

PB code, function mod (5,2) is the result of what?

Answer

5

3

1

2

Note: Maybe the answers are not correct, you should check again

Good Luck!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x