Multiple-Choice Questions About Powerbuilder Part 9

Multiple-Choice Questions About Powerbuilder Part 9

Question: 1

SQLCA stands for:

Answer

Structured Query Language Communication Area

Question: 2

What type of events you can define at the application object?

Answer

Any event that is available in the event declaration dialog box.

Only events that are not related to the user interactions.

Only events that are related to the distributed processing.

Only DDE events.

None of the above

Question: 3

SQLSA stands for:

Answer

 Structured Query Language Dynamic Staging Area

Question: 4

Application’s open has the following script
int i=0

Answer

PowerBuilder stops the application as soon as the above script execution completes.

Application keep waiting till it encounters Exit() function.

Application keep waiting till ‘Halt’ or ‘Halt with Close’ statement.

The above script is wrong. You can’t write anything other than the Open() function in the application’s Open event.

Question: 5

SQLDA stands for:

Answer

Structured Query Language Dynamic Description Area

Question: 6

Which one of the following is faster?

Answer

Enabling and Disabling a menu item.

Hiding and Displaying a menu item.

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

All of the above gives the same performance.

Question: 7

DDE stands for:

Answer

Dynamic Data Exchange

Question: 8

Application Object ConnectionBegin is fired when the connection begin in:

Answer

Server Application Only

Client Application Only

In Both Client & Server Applications

Depends on the Settings

None of the above

Question: 9

OLE stands for:

Answer

Object Linking and Embedding

Question: 10

Idle() function

Answer

Makes the application idle and stops taking input from the user.

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

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

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

PowerBuilder doesn’t have Idle() function.

Question: 11

MAPI stands for:

Answer

Messaging Application Programming Interface

Question: 12

SignalError() function

Answer

Fires Application SystemError event.

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

Checks for any error signals.

Populates the Error object and fires Application SystemError event.

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

Question: 13

Which function changes the focus to a different column in a DataWindow?

Answer

SetColumn

Question: 14

A Datawindow is passed to a function as Read-Only. Can the code in the function assign another DataWindow to the parameter Datawindow?

Answer

Yes

No

Question: 15

What is the function used to change the value of a column in a DataWindow?

Answer

SetItem

Question: 16

When a general error occurs at run-time and the Application SystemError event has no script:

Answer

PowerBuilder displays error information and stops the application.

PowerBuilder displays the error and allows the user to choose to continue/stop the application.

you can’t run a PowerBuilder application without writing script to the SystemError event.

logs the error informaton to a log file and continues application execution without displaying the error.

You can control error processing by calling SetErrorActionCode() function.

Question: 17

Which DataWindow function displays an icon to indicate the current row in a DataWindow?

Answer

SetRowFocusIndicator

Question: 18

You specify the start-up window name:

Answer

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

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

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

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

Any of the above is correct.

Question: 19

What is the function used to display a window as a sheet in a MDI window?

Answer

OpenSheet or OpenSheetWithParm

Question: 20

Sorting can only be done at the client?

Answer

TRUE

False

Question: 21

When you open a window using OpenWithParm(), where the parameters are stored?

Answer

Message Object

Question: 22

Which of the following is correct.

Answer

You can inherit application object only once per application.

You can limit the number of times an application can instantiate.

You can declare only Public functions at the application object.

Application Objects can be shared between different applications, when the applications are developed in the ‘PowerBuilder Enterprise edition’.

None of the above.

Question: 23

What is the event that is fired automatically when you close the window?

Answer

CloseQuery

Question: 24

Variables declared in the Application Object are:

Answer

global by default.

private to the application object.

local to the event in which the variable is declared.

None of the above.

Answer A and B are correct.

Question: 25

What is the pronoun used to refer to the ancestor from a descendent?

Answer

Super

Question: 26

What events you can declare at the menu object?

Answer

Only Menu related events.

Only events that are not mapped to any event id.

Only PowerBuilder custom events.

There are no restrictions.

None of the above.

Question: 27

In the client application, after connecting to the DPB server, which function you should call before firing any event/function on the proxy object?

Answer

SetConnect/CreateInstance

Question: 28

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

Answer

Menu

Border

Control Menu

Title

Maximize & Minimize buttons

Question: 29

A DataWindow control dw_1 has a composite DataWindow (has three DataWindows). How many times the SQLPreview() event is fired when you call dw_1.Retrieve()?

Answer

Number of Rows in DW Object 1 + DW Object 2 + DW Object 3

Number of rows in the first DW object specified.

Number of rows from the DW Object that you specify as Main DW object.

Zero times.

Total number of rows in all updatable DW objects in that DW.

Question: 30

Disabling a menu item will:

Answer

disable the associated toolbar icon.

hide the associated toolbar icon.

not affect the toolbar icon.

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

Question: 31

What is the maximum number of letters an identifier in PowerBuilder can have?

Answer

40

Question: 32

A menu item can have:

Answer

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.

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.

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

Question: 33

What is the function used to change the SQL statement of a DataWindow? (Other than the Modify function).

Answer

SetSQLSelect

Question: 34

When you declare an instance variable with public access at a menu, that variable can be accessed from:

Answer

the parent window only.

any open sheet in the MDI application.

the parent window and the MDI window.

the menu and the active sheet.

the menu only.

Question: 35

Which DataWindow function applies DataWindow changes to the Database?

Answer

Update

Question: 36

The ITEM attribute of a menu:

Answer

contains the menu item name.

is an array and contains one element for each of the menu bar item.

is an array and contains all the menu bar items and menu items ( one element for each item).

Menu doesn’t have ITEM attribute. It has CONTROL attribute.

None of the above.

Question: 37

Which DataWindow function applies EditControl buffer content to the DataWindow Primary buffer?

Answer

AcceptText

Question: 38

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

Answer

ParentMenu

This.Menu

This.MenuID

This.MenuName

None of the above

Question: 39

Which function refreshes the Datawindow automatically at a certain intervals?

Answer

DataWindow.Refresh(Interval)

Return the refresh interval from the DatWindow RefreshTimer event

Set the DataWindow Timer property

None of the above

Question: 40

Pronoun ‘ParentWindow’ and ParentWindow() refers to the samething.

Answer

Yes

No

Question: 41

The function name that is used to select/de-select a item in a ListBox.

Answer

SetState

Question: 42

Referring to ‘This’ from one of the Menu Item refers to:

Answer

Menu bar item

The Menu item in which event the pronoun THIS is coded.

The menu.

THIS is not a valid pronoun in the menu.

Question: 43

Which function is used to change the SQL statement of a Datawindow, but restricted to call from a single event.

Answer

SetSQLPreview

Question: 44

Which one of the following is not a valid menu event?

Answer

Clicked

Selected

MouseButtonDown

Question: 45

Which function is used to re-select a row when the row is found as changed between retrieval and update.

Answer

ReSelectRow

Question: 46

A window has three controls, one RadioButton, one CommandButton and one custom UserObject. That UserObject has four controls in it. UpperBound( This.Control[] ) in the Window’s Open event returns:

Answer

Eight

Four

Seven

Nine

Three

Question: 47

What is the equalant function for Window1.Visible = False

Answer

Window1.Hide

Question: 48

CloseQuery event is best described as:

Answer

Fires automatically when the database query is completed.

Trigger or Post this event to cancel the database query.

Fires before the window’s ‘Close’ event.

None of the above.

Question: 49

Which function sets the mask for the EditMask control.

Answer

SetMask

Question: 50

WindowName.WorkSpaceHeight() returns:

Answer

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 heght.

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

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

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

Question: 51

Which function gives the unformatted data from a EditMask control.

Answer

GetData

Question: 52

Which one of the following statement is true?

Answer

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.

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.

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

Question: 53

Which function returns the current row in the DataWindow.

Answer

GetRow

Question: 54

HALT statement:

Answer

Hangs the application.

Closes the application.

Closes the application, but executes the Application Close event.

There is no HALT statement in PowerBuilder. We have STOP statement.

Stops taking input from the user till the specified time.

Question: 55

Which function returns the reference handle of a child DropDownDataWindow?

Answer

GetChild

Question: 56

In a SingleLineEdit control, the Modified event fires when:

Answer

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.

The content of the control is emptied out.

SingleLineEdit doesn’t have Modified event. It has EditChanged event.

Question: 57

Which function inserts/appends a brand new record into a DataWindow?

Answer

InsertRow

Question: 58

Which of the following adds a new menu item to the existing menu?

Answer

ADD MENUITEM ‘ItemName’ ‘ItemText’

APPEND MENUITEM ‘ItemName’ ‘ItemText’

MenuObjectName.NewMenuItem(…)

Find the upperbound of the ITEM[] and add one more element to the ITEM[] array and populate value and call MenuObjectName.Refresh

None of the above.

Question: 59

Write the code in a single line to insert a row just before the current row. Assume, there are few rows in the DataWindow dw_1 and the user clicked on one of the valid row.

Answer

dw_1.InsertRow(dw_1.GetRow())

Question: 60

A window event/function has the following script:
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.

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.

Refers to the associated WINDOW.

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

Question: 61

Enter the Datawindow function name that returns the total count of rows that are scheduled for either INSERT or UPDATE in the database.

Answer

ModifiedCount

Question: 62

What will happen if you call This.ParentWindow() in a window’s script?

Answer

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.

You can only call the ParentWindow() function from a menu item script.

Question: 63

What is the Datawindow function name that returns the total count of rows that are scheduled to DELETE from the database.

Answer

DeletedCount

Question: 64

Which one of the following is true?

Answer

You can’t write IF…ELSE statement in one line.

You can write as long as each block (IF block, ELSE block) contains only one Statement.

You can write as long as the commands in each blocks are separated by a semicolon and each block is enclosed in curly brackets.

This type of structure is allowed only in the DataWindow expressions.

Question: 65

If you wanted to put a picture of a hand pointing to the current row of a DataWindow, what function would you use?

Answer

SetRowFocusIndicator

Question: 66

Assume three local integer variables, i, j, k are declared. Can you assign a value to all those three variables in one step – such as i = j = k = 100

Answer

Yes

No

Question: 67

A file can be copied into a DataWindow using ____________ function.

Answer

ImportFile

Question: 68

What should I do if I want to issue multiple PowerScripts commands in one line?

Answer

Yes, you need to separate each command with a colon.

Yes, you need to separate each command with a semicolon.

Yes, you need to separate each command with double hyphens.

Multiple statements on one line is not supported in PowerScript

Question: 69

______________ function is used to add/insert a new row in the Datawindow and set the row with the value from a string.

Answer

ImportString

Question: 70

Which of the following property minimizes the window to an icon.

Answer

WindowName.State

WindowName.WindowState

WindowName.Status

WindowName.DisplayStatus

None of the above. Call WindowName.Minimize() function.

Question: 71

Which function copies data from the Clipboard into a DataWindow?

Answer

ImportClipboard

Question: 72

Can a PowerBuilder window have it’s own vertical/horizontal scrollbars? (Not the scrollbar controls).

Answer

Yes

No

Question: 73

Which function is used to change a validation rule in a DataWindow at runtime.

Answer

SetValidate

Question: 74

The UPDATE statement in an embedded SQL statement updates 10 rows. What would be the value of SQLCODE?

Answer

10

1

0

100

NULL

Question: 75

Which function is used to change the sort criteria for a DataWindow?

Answer

SetSort

Question: 76

How do you refer to the host variable in an embedded SQL

Answer

Prefix the variable with colon.

Prefix the variable with pound sign.

Prefix the variable with double colon.

Prefix and suffix the variable with question mark.

No prefix or suffix is required. Just use like any normal variable.

Question: 77

Which command will order the DataWindow records on a specified key at runtime?

Answer

Sort

Question: 78

Howmany Dynamic SQL formats are available in PowerBuilder?

Answer

3

1

4

2

Dynamic SQL is not supported by PowerBuilder

Question: 79

Which command/function will blank out a DataWindow?

Answer

Reset()

Question: 80

product_master table has 10 rows. The host variable ‘p_desc’ in the
Select product_description into :p_desc from product_master;
embedded SQL contains:

Answer

The product_description of the first row from the product_master table.

The product_description of the last row from the product_master table.

The product_description of all the rows from the product_master table.

PowerBuilder doesn’t compile a embedded SQL statement unless the SQL statement has a WHERE clause.

Results are unpredictable

Question: 81

Which DataWindow buffer stores the deleted rows?

Answer

Delete!

Question: 82

The UPDATE statement in an embedded SQL script did not update a single row. What would be value of SQLCODE?

Answer

-1

NULL

-100

0

Results in error.

Question: 83

Which DataWindow buffer stores the modified values of a row?

Answer

Primary!

Question: 84

Which one of the following returns the number of rows affected by a SQL Statement?

Answer

SQLCA.SQLRows

SQLCA.SQLNRows

SQLCA.RowsAffected

SQLCA.RowsCount

SQLCA.RowsCount

Question: 85

Which Datawindow buffer stores the filtered rows?

Answer

Filter!

Question: 86

Which one of the following contains the database specific (error) information?

Answer

SQLDBCode

SQLErrText

SQLErrorText

SQLReturnData

SQLDBErrorText

Question: 87

Which Datawindow buffer stores the original values of a modified row?

Answer

Original!

Question: 88

When connecting to the SQL AnyWhere database, which one of the following is true?

Answer

You should populate SQLCA.UserID with the user name.

You should populate SQLCA.LogID with the user name.

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 need to populate SQLCA.UserID and SQLCA.LogID

Question: 89

Which Datawindow buffer contains the text that is currently being entered by the user?

Answer

EditControl

Question: 90

When you are connecting to the Adaptive AnyWhere database using Open Database Connectivity, what should be the value you need to set for SQLCA.DBMS?

Answer

WatcomSQL

SQLAnyWhere

AdaptiveServerAnyWhere

ODBC

Sybase

Question: 91

Write the function that determines whether the last actionin the DataWindow can be cancelled or not.

Answer

CanUndo

Question: 92

TransactionObject.DBHandle() returns a positive long value:

Answer

as long as the Transaction object is connected to the database.

as long as the transaction object is not destroyed.

Only when the database connection is busy because of database queries.

Only when the database connection idle.

Only when the database exists.

Question: 93

List the function that cancel the current DataWindow query.

Answer

DbCancel

Question: 94

Which one of the following is the ancestor to the SQLCA?

Answer

CommunicationArea

Transaction

TransactionObject

DatabaseConnection

SQLConnection

Question: 95

Which function returns the total number of elements, i.e. subscripts, in an array?

Answer

UpperBound

Question: 96

When you change the SQLCA value to MyTransaction in the Application Painter:

Answer

MyTransaction becomes the ancestor to the SQLCA

MyTransaction becomes the descendent to the SQLCA

MyTransaction becomes the ancestor to Transaction

SQLCA becomes the grand parent to MyTransaction

You can’t change it.

Question: 97

How many times the SQLPreview event triggers when a Datawindow has three nested DataWindow reports.

Answer

1

Question: 98

I would like to have a function available at the SQLCA. What should I do?

Answer

Define the function in the SQLCA.

define the function in the ‘Transaction’ object.

Create a user object of type transaction and define the function and insert the user object between transaction and SQLCA.

It’s not possible in the current version. May be in future versions.

Define the function in the function painter and Open the SQLCA object and list the previously defined function here.

Question: 99

List the function that lists the first subscript number of an array.

Answer

LowerBound

Question: 100

SQLCA is available only in the Client PowerBuilder applications. It’s not available in the Server PB Applications. You need to use ServerSQLCA in the Server PB Applications.

Answer

TRUE

False

Good Luck!

PassWords

About The Author

0 0 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
gate io nedir
1 year ago

I am sorting out relevant information about gate io recently, and I saw your article, and your creative ideas are of great help to me. However, I have doubts about some creative issues, can you answer them for me? I will continue to pay attention to your reply. Thanks.