Multiple-Choice Questions About Powerbuilder Part 4

Multiple-Choice Questions About Powerbuilder

Question: 301

In the inheritence hirerachy, PowerBuilder is how to search ?

Answer

Just in Top

Bottom-to-Top

Top-to-Bottom

Randomize

Question: 302

Which DataWindow style on Program execution , we can adjust title field to change field width ?

Answer

Group

N-UP

FreeForm

Grid

Question: 303

The following PB codes import data into a datawindow with a set Group and perform Group Grouping calculations: 

dw_emp.ImportFile(“d:\employee.txt”) 
dw_emp.SetSort(“1A”) 
dw_emp.Sort() 

dw_emp._______________  Which function should be used?

Answer

group()

 

filter()

 

groupcalc()

 

SetRedraw(true)

Question: 304

After executing the following PB script , what Is J

Long I,J
For I = 1 To 10
Do Until I > 5
J = J + 2
If J > I Then Exit
Loop
Do
J = J + 2
If J > I Then Exit
Loop While I > 5
Next

Answer

infinite loop

32

16

30

Question: 305

What is the data type of data window control’s “DataObject” properties?

Answer

Enumerated

datawindow

string

Any

Question: 306

Which of the following functions can be treated with a hidden field ways, but this function must be before they can perform this function in the Describe () function.

Answer

CPU()

Evaluate()

Run()

GetEnvironment()

Question: 307

PowerBuilder’s SQLSA,Which of the following statements is true?

Answer

You can access information in SQLSA.

PowerBuilder provides a global DynamicStorageArea variable.

PowerBuilder provides a global DynamicDescriptionArea variable.

PowerBuilder provides a global DynamicStagingArea variable.

Question: 308

Which PB’s variable declaration are wrong ?

Answer

S123_%~NBA

S123_%NBA

123_NBA

%123_NBA

Question: 309

Program code is
 
1 string lstr_longName , lstr_shortName
2 string Prior,Before
3 Integer I
4 Lstr_longName = lstr_shortName
5 I= 1
6 I = i++
7 if Prior = NULL then
8 messagebox(‘warning’,’a error’)
9 end if
10 lstr_longName = lstr

The following error statement is correct

Answer

The seventh line, Prior = NULL , characte string can not compare with NULL

The sixth line, I=i++ do not use an expression to the variable assignment

Second lines, Prior reserved words can not be named for the logo

Second lines, Before reserved words can not be named for the logo

Question: 310

In PB, inheritance several categories:

Answer

Part inheritance

Covering inheritance

Fully inherited

Expansion inheritance

Question: 311

Which of the following is the correct wording is dynamic SQL

Answer

PREPARE SQLDA FROM “execute emp_select @stateparm=?” ;

EXECUTE SQLSA  USING :Dept_id_var,:Dept_name_var,:Mgr_id_var ;

PREPARE SQLCA FROM :sqlstatement ;

EXECUTE IMMEDIATE :MyASE USING My_trans ;

PREPARE SQLSA FROM “INSERT INTO department VALUES (?,?,?)” ;

Question: 312

When defining the function PASS BY parameter, you can choose which type?

Answer

string

reference

readonly

value

Question: 313

In powerbuilder , which are column style types?

Answer

CheckBox

DropDownListBox

RadioButton

EditMask

Question: 314

What functions do you use to change the datawindow row status?

Answer

GetItemStatus()

ResetUpdate ( )

SetRow()

SetItemStatus()

Question: 315

Run the following syntax to get the result that B is 

any a,b
string c,d
int e,f 
c=’TEST’
e=99
a=c+’100′
a=e
b=a+100

Answer

string type,result is TEST100

string type,result is TEST99

int type,result is 199

int type,result is 100

Question: 316

Which of the following is printer functions?

Answer

PrintSetupPrinter

PrintSetPrinter

PrintGetPrinter

PrintGetPrinters

Question: 317

Integer A, B[5,10]
For A = 1 To UpperBound(B,1)
A = A + 1
Next

what Is A answer?

Answer

8

7

5

6

Question: 318

What is the meaning of the key event parameter keyflags=1?

Answer

press Shift And Ctrl

Not press Shift OR Ctrl

press Shift

press Ctrl

Question: 319

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))

What Is the result?

Answer

6

5

9

10

Question: 320

The following what the value of the variables of 10?

Answer

decimal  a=9.6

double  a=10.6

long a =10.6

int  a=9.6

Question: 321

What are the Identification names in PB?

Answer

_odd

@mail

This

lockopen

Question: 322

When sharing data between two DataStore objects using the ShareData function, which information will be shared?

Answer

Sort order

Filter Buffer

Primary buffer

Delete Buffer

Question: 323

Which PB scripts excute will get result ‘999’?

Answer

Mid(‘09990’,2,3)

99′ + Space (1)

String (999,’000′)

Fill( ‘9’, 3 )

Question: 324

Which sequence of establishing system is correct ?

Answer

Window-application-workspace

workspace-application-window

Application-window-workspace

application-workspace-window

Question: 325

PowerScript pronouns which provides correct?

Answer

super

parentwindow

this

parent

Question: 326

Which can be used for time display formats

Answer

a/p

A/P

AM/PM

am/pm

Question: 327

The return value of a function FileDelete () is ()

Answer

String

Long

Integer

Boolean

Question: 328

Which of the following DataWindow display types can only be used for reporting?

Answer

Tabular

FreeForm

Grid

CrossTab

Question: 329

How to set the column font Underline display?

Answer

dw_1.Object.<Columnname>.Font.Underline=’1′

dw_1.Modify(“<Columnname>.Font.Underline=’1′”)

dw_1.Modify(“<Columnname>.Font.Underline=’0′”)

dw_1.Object.<Columnname>.Font.Underline=’0′

Question: 330

How to shield the mouse wheel?

Answer

Event other :if message.number = 525 then return 1

Event other :if message.number = 524 then return 1

Event other :if message.number = 522 then return 1

Event other :if message.number = 523 then return 1

Question: 331

Run This powerscript languge, Value j = ?

Integer i,j
j = 10
Do While i < 10
If i >= 5 Then
j += i * 2
Else
j -= i / 2
End If
i++
Loop

Answer

20

18

74

75

Question: 332

How to set the column font bold display?

Answer

dw_1.Object.<Columnname>.Font.Weight=’400′

dw_1.Modify(“<Columnname>.Font.Weight=’400′”)

dw_1.Modify(“<Columnname>.Font.Weight=’700′”)

dw_1.Object.<Columnname>.Font.Weight=’700′

Question: 333

How to execute the ancestor event’s script from the descendant’s event?

Answer

None of the above

You can use ParentWindow().EVENT_NAME syntax.

You can use Parent.EVENT_NAME syntax.

You can use CALL SUPER::EVENT_NAME syntax

Question: 334

which options are powerbuilder standard data types?

Answer

Time

UnsignedInteger

Real

log

Question: 335

Related to identifier names in PB scripts,which declare is wrong ?

Answer

descriptor

indirected

%indirect

descriptors

Question: 336

What event can you trap errors in pb?

Answer

SystemError event

DWRuntimeError Event

DBError Event

ItemError Event

Question: 337

What Message appears when executing the following Syntax?

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

A

B

C

D

Question: 338

Whichever is the current target synonymous?

Answer

Parent

ParentWindow

This

Super

Question: 339

In PB, Datawindow is connected to the database. What are the possible values of the returned SQLCode?

Answer

1

-1

100

0

Question: 340

Which line number code of the following power builder program has errors? 

1  integer i
2  string ls_mat_no
3  datastore lds_datastore
4 
5  lds_datastore = create datastore
6  lds_datastore.dataobject = ‘d_matm’
7  lds_datastore.settransobject(SQLCA) 
8  lds_datastore.retrieve()
9  for i = 1 to lds_datastore.rowcount()
10       ls_mat_no = lds_datastore.getitemstring(i,’mat_no’)
11       select mat_nm from matm where mat_no = :ls_mat_no ;
12       lds_datastore.setfocus()
13      lds_datastore.setitem(i,’unit’,’KG’)
14 next

Answer

13

12

9

11

Question: 341

PB.SQLCA.DBParm = “CommitOnDisconnect=’No'”What does this script mean

Answer

Error occurs when compiling

 

Rollback uncommitted data when disconnecting the database

Commits data automatically when disconnecting the database

Disconnect from the database

Question: 342

PB. Which the definition of below is correct for Deactivate PowerScript event ?

Answer

Occurs just before the window becomes active.

Occurs just after the window becomes active.

When a window is opened, a Deactivate event occurs.

Occurs when the window becomes inactive.

Question: 343

PB. Use SetRedraw PowerScript function, Which answer of below is correct?

Answer

dw_1.SetRedraw(1)

dw_1.SetRedraw(0)

dw_1.SetRedraw()

dw_1.SetRedraw(FALSE)

Question: 344

PB. OpenSheet() PowerScript function, Which the definition of below is correct?

Answer

Opens a sheet within an MDI (multiple document interface) frame window and creates a menu item for selecting the sheet on the specified menu.

Means open all sheet within menu item.

Opens another sheet within a sheet window and creates a menu item for selecting the sheet on the specified menu.

Opens a main window within a sheet window and creates a menu item for selecting the main on the specified menu.

Question: 345

PB. Open() PowerScript function, Which the syntax of below is not correct?

Answer

w_emp w_e1, w_e2 Open(w_e1) Open(w_e2)

child lcw_data Open(w_emp, lcw_data)

Open(w_emp)

w_emp lw_open Open(lw_open)

Question: 346

PB. Data Source in New Data Pipeline dialog box, Which the Data Source of below is not correct?

Answer

External

Stored Procedure

Quick Select

Query

Question: 347

Whether the PB DataWindow dw_1 contains nested DataWindows, which syntax is right?

Answer

dw_1.DataWindow.Object.Nested

dw_1.DataWindow.Nested

dw_1.Describe(“DataWindow.Nested”)

dw_1.Object(“DataWindow.Nested”)

Question: 348

in PB, opentab() function, which answer is not correct?

Answer

Return null If any argument’s value is null

Return -1 If any argument’s value is null

Returns 1 if it succeeds

Return -1 if an error occurs

Question: 350

PB. tabcontrolname.MoveTab (source, destination ) PowerScript function, Which the answer of below is correct?

Answer

If destination is 0 or greater than the number of tabs, can not moved.

If destination is 0 or greater than the number of tabs, the scrip be error.

If destination is 0 or greater than the number of tabs, source is moved to the end.

Question: 351

The Visible property for controls in DataWindow objects, which one is not supported?

Answer

GroupBox

tab

Picture

Text

Question: 352

PB. This statement in datawindow an event script gets the type:ls_type = dwo.Type, Which Type of below ls_type value is not correct ?

Answer

data

report

column

bitmap

Question: 353

PB. AcceptText method (DataWindows), Which answer of below is not correct?

Answer

If dwcontrol is NULL, in PowerBuilder and JavaScript the method returns Error.

When a user moves from item to item in a DataWindow control, the control validates and accepts data the user has edited.

If dwcontrol is NULL, in PowerBuilder and JavaScript the method returns NULL

If there is no DataWindow object assigned to the DataWindow control or datastore, this method returns 1.

Question: 354

PB. Cut() PowerScript function, Which return value of below is not correct?

Answer

-9

1

0

-1

Question: 355

PB. Clear() PowerScript function, Which the definition of below is correct?

Answer

Deletes selected text or an string object from the specified control, but does not store it in the clipboard.

Cut selected text or an OLE object from the specified control, but does not store it in the clipboard.

Deletes selected text or an OLE object from the specified control, store it in the clipboard.

Deletes selected text or an OLE object from the specified control, but does not store it in the clipboard.

Question: 356

PB. This script, Which answer Of below Is correct?

Integer li_month, li_year, ld_day1
ld_day1 = DayNumber(2000-01-01)
li_month = 12 + 1
If li_month > 12 Then
li_month = Mod(12, 12)
li_year++
End If

MessageBox(”,String(li_year) + “-” +String(li_month) + “-” + String(ld_day1))

Answer

1-0-8

1-0-0

0-1-0

1-0-6

Question: 357

Which winodw control’s event is triggered when the window’s dimension changes?

Answer

constructor

resize

open

close

Question: 358

The following operators give priority to the highest?

Answer

NOT

*

++

^

Question: 359

Witch one is use ShareData () need not comply with _ those conditions?

Answer

DataWindow same number of fields

DataWindow data the same sort

DataWindow fields in the same order

dataWindow same field type

Question: 360

Which statement insert a row at the end of the DataWindow?

Answer

InsertRow(0)

Setrow(0)

Setrow(1)

InsertRow(5)

Question: 361

The following method, which can move cursor to the specified row?

Answer

RowsMove()

ScrollToRow()

SelectRow()

ScrollPriorRow()

Question: 362

If not properly save more rows of data in the data window and demanded the closure of the window, there is the system immediately triggers

Answer

Open

Close

CloseQuery

DBError

Question: 363

In Powerbuilder, which is the SQLCode return value if the result of SQL execution fails ?

Answer

100

0

1

-1

Question: 364

In the code dwcontrol.GetItemString(row,column,dwbuffer) , which is the dwbuffer initial value ?

Answer

Primary!

Original!

Delete!

Filter!

Question: 365

Which of the following special characters are PB of tabs?

Answer

~d

~r

~n

~t

Question: 366

Integer I
I = 1
Do Until (I > 5)
lb_1.AddItem(“Hai”)
I = I + 1
Loop

How many the result Of Loop ?

Answer

1

6

5

4

Question: 367

In PB, there is a type of window that does not depend on any other window. It can be covered by other windows. It can also be covered by other windows?

Answer

Child Window

Main Window

Response Window

Popup Window

Question: 368

In the datawindow, what is the only difference between views and tables ( ) ?

Answer

View can only retrieve, add, delete data, can’t modify data.

View can only retrieve and delete data, can’t add and modify data.

View can only retrieve data, can’t add,delete and modify data.

View can only add data, can’t modify data.

Question: 369

PB. Which answer Of below Is correct For Sum?

Int i,j,k,Sum
For i = 1 To 10 Step 5  
For j = 1 To 2          
For k = 1 To 2          
Next  
Next  
Sum = i+j+k
Next

Answer

2

22

11

12

Question: 370

PB. which is the script have not error when compile?

Answer

dw_single.SetFilter(“comp_no = ‘” + gs_compno + “‘”) dw_single.Filter(1)

dw_single.SetFilter(“comp_no = ‘” + gs_compno + “‘”) dw_single.Filter()

dw_single.SetFilter(“comp_no = ‘” + gs_compno + “‘”) dw_single.Filter(“comp_no = ‘” + gs_compno + “‘”)

dw_single.SetFilter(“comp_no = ‘” + gs_compno + “‘”) dw_single.Filter(gs_compno)

Question: 371

PB.  Which answer Of below Is correct?

String day_name
If Len(String(Today())) > 0 Then  
day_name = DayName(Date(Today())) MessageBox(”, day_name)
Else  
MessageBox(“Error”, “This date is invalid”)
End If

Answer

Returns the today’s number.

Returns the today’s name.

This date is invalid

Be error when compile

Question: 372

PB. Which variable type of below is not use when create Structure?

Answer

DropDownDW

DropDownListBox

Datawindow

Double

Question: 373

PB. Which the definition of below is not correct for Hide event?

Answer

Occurs just before close the another window.

Occurs just after open the window.

Occurs just before the window is hidden.

Occurs just after the window is hidden.

Question: 374

PB. Which the definition of below is not correct for Reset method (Graphs in DataWindows)?

Answer

Use Reset to clear the data in a graph before you save data.

Use Reset to clear the data in a graph after you save data.

Use Reset to clear the data in a graph after you add new data.

Use Reset to clear the data in a graph before you add new data.

Question: 375

PB. This script, Which answer of below is correct? SQLCA.SQLCODE = -1

Answer

Valid, non-null value

Conversion error

Null value

Invalid, not null value

Question: 376

PB.This script. Which answer of below is correct? dw_1.Modify(“DataWindow.QueryMode=YES”)

Answer

Modifying the WHERE clause of the DataWindow object’s SQL SELECT statement

Changing the data source of the DataWindow object on DW_1

Remove the DataWindow’s SELECT statement on DW_1

Turn on query mode so user can specify data on DW_1

Question: 377

PB. Which the definition of below is not correct for Deactivate PowerScript event ?

Answer

Occurs just before the window becomes active.

Occurs just after the window becomes active.

When a window is opened, a Deactivate event occurs.

Occurs when the window becomes inactive.

Question: 378

( )Style for the data window object provides a convenient way to group data

Answer

Label

Grid

Group

Tabular

Question: 379

PowerScript arithmetic expression a – = b + 4 is equivalent to ()

Answer

a = – ( b + 4 )

a = a – (b+4)

a = ( b + 4 ) – a

a = 1 / ( b + 4 )

Question: 380

Grid in the DataWindow format is “the same amount of row data” is displayed from top down, ask what format is the data “left to right” display?

Answer

Label

N-UP

Composite

Crosstab

Question: 381

Which of the following events will check the value of the Message.ReturnValue when the window is closed?

Answer

Hide

Deactivate

close

Closequery

Question: 382

Run This power script,i = ?

Int i
For i = 20 To 40 Step 10
Do While i > 40
MessageBox(”,i)
Loop
Next

Answer

30

40

no messagebox message

50

Question: 383

Which function is used to Remove all leading and trailing white-space characters from a string ?

Answer

trim

left

len

right

Question: 384

In DataWindow expression, what is the meaning of the columnname[-1]?

Answer

Error expression

next row columnname values.

current row columnname values.

previous row columnname values

Question: 385

ItemChanged event, return meaning is correct?

Answer

Return 1: do not accept the input values, the focus will remain in the original field, until the correct date

Return 2: accept input values

Return 1: accept input values

Return 0: do not accept the input values, but is allow turn the focus of the other fields

Question: 386

Which description is correct for DataWindow Summary’s object ?

Answer

display on Last Group Page

display on Last Page

display on Each page

display on Each group

Question: 387

int i
i = 10.1
i = i + 0.4
MessageBox(“””,i) 

MessageBox, i display value is how much?

Answer

11

10.5

10

10.1

Question: 388

ID qty sum 1 10 10 2 32 42 3 11 53 4 44 97 5 55 152 Which function in computed field can return the running total?

Answer

CumulativeSum( qty  for all )

Sum( qty  for all )

Crosstabsumdec( 1 )

Crosstabsum(1)

Question: 389

Execute the following statement:

any aa = 5
string kk = “aa”
aa = kk

Type of variable aa ?

Answer

Type Uncertain

any

string

int

Question: 390

PB SQL Select col into :ls_a From tablename ; IN PB SQL statement,If not find the data, what is the value of Sqlcode? 

Answer

-1

0

1

100

Question: 391

Boolean lb_var1, lb_var2, lb_var3
MessageBox(‘’, Not (lb_var1 And lb_var2) )
lb_var1 = True
lb_var2 = True
lb_var3 = False
MessageBox(‘’, lb_var1 OR lb_var2 And lb_var3) 

What are the first & second value of MessageBox?

Answer

true, true

false, false

true, false

false, true

Question: 392

To trigger button clicked event in the program, the following statement is not correct ( )

Answer

cb_1.PostEvent(Clicked!)

 

cb_1.trigger static event clicked()

 

cb_1.triggerevent(clicked!)

 

cb_1.trigger  event(clicked!)

Question: 393

About the Tab Order of statements is wrong?

Answer

Max 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: 394

Run This powerscript languge, MessageBox will Show what Number?

Long i
String str str = ‘A’
i = 10
Choose Case Asc(str) + i
Case 74
MessageBox(”,’1′)
Case 75
MessageBox(”,’2′)
Case 76
MessageBox(”,’3′)
Case Else
MessageBox(”,’4′)
End Choose

Answer

4

3

1

2

Question: 395

Which of the following can be the RTE control rte_1 cursor where the words are displayed separately?

Answer

rte_1.SelectTextAll()

rte_1.SelectTextLine()

rte_1.SelectTextWord()

rte_1.SelectText()

Question: 396

Which can report whether the row has been modified in the datawindow?

Answer

IsRowModified()

ModifiedCount()

Modified()

GetNextModified()

Question: 397

Which of the following about the window types is wrong?

Answer

CHILD type, you can not specify Menu

MAIN type, you can open other windows under, such as Child, Popup

POPUP type, unable to move out of range Parent window

RESPONSE type, once opened, unless it is turned off, otherwise the system can not be applied to other functions

Question: 398

Using the SetItemStatus method(use once) to change row status ,the following statement is wrong?

Answer

NotModified! can be changed to New

NotModifiedcan be changed to DataModified!.

New! can be changed to NewModified!.

DataModified! can be changed to New!.

Question: 399

Which power script , sum = 30?

Answer

Int sum,i,j
Do
Do Until j > 10
j ++
sum = i + j;
Loop
i ++
Loop Until i > 10

MessageBox(”,sum)

Int sum,i,j
Do
Do
j ++
sum = i + j;
Loop Until j > 10
i ++
Loop Until i > 10
MessageBox(”,sum)

Int sum,i,j
Do Until i > 10
Do
sum = i + j;
j ++
Loop Until j > 10
i ++
Loop
MessageBox(”,sum)

Int sum,i,j
Do Until i > 10
Do Until j > 10
sum = i + j;
j ++
Loop
i ++
Loop
MessageBox(”,sum)

Question: 400

How to get the original value of Column?

Answer

getitemstring(row,column,original!)

getitemstring(row,column)

getitemstring(row,column,primary!,True)

getitemstring(row,column,primary!,False)

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

Good Luck!

PassWords

About The Author

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments