Конвертер валютUSD 2,9976EUR 3,3551Моя статистикаПройдите любой тест
Все записи блога →
Последние Новости
  • Тур Хейердал — путешественник, переплывший океан на плоту
    Шесть мужчин, бальсовый плот и бескрайний Тихий океан. Тур Хейердал хотел проверить смелую идею: могли ли жители Южной Америки в древности добраться до островов Полинезии. Чтобы узнать это, он сам отправился в путь.Путь к успехуТур Хейердал родился 6 октября 1914 года в городе Ларвик в Норвегии. С детства он увлекался зоологией и дикой природой. В 1937–1938 годах Тур с женой прожил около года на острове Фату-Хива в Полинезии. Именно там, наблюдая за ветрами и течениями, он задумался о происхожде...
  • Христофор Колумб — мореплаватель, открывший Европе Америку
    Утром 12 октября 1492 года матрос с корабля «Пинта» крикнул, что видит берег. Через несколько часов три небольших судна подошли к острову, который местные жители называли Гуанахани. Экспедиция Христофора Колумба завершила первый переход через Атлантический океан, после которого мир перестал быть прежним.Путь к экспедицииКолумб родился около 1451 года в Генуе в семье ткача. Он рано ушёл в море, плавал по Средиземному и Атлантическому океанам, жил в Португалии. Он был уверен, что до Индии и Китая ...
  • Фрэнк Синатра — «Голос» века, певший по-своему
    Шляпа с лентой, небрежно накинутый плащ, бархатный баритон — Фрэнк Синатра умел превратить трёхминутную песню в маленький спектакль. Прозвище «Голос» закрепилось за ним ещё в 1940-х, и за десятилетия его мало кто смог оспорить.Путь к успехуСинатра родился в декабре 1915 года в Хобокене, штат Нью-Джерси, в семье итальянских эмигрантов. Музыкального образования он почти не получил, зато с юности пел на радио и в клубах. Первые успехи пришли в оркестрах Гарри Джеймса и Томми Дорси. В начале 194...
  • Михаил Булгаков — мастер, которого прочли после смерти
    Автор, которого при жизни почти не печатали, оказался одним из самых читаемых писателей столетия. История Михаила Афанасьевича Булгакова — это история терпения, упорства и веры в свою книгу.Путь к успехуБулгаков родился в 1891 году в Киеве, в семье преподавателя духовной академии. В 1916 году он окончил медицинский факультет Киевского университета и сразу начал работать врачом, в том числе в земской больнице в селе Никольском Смоленской губернии. Эти годы позже отразились в «Записках юного врача...
  • Дмитрий Менделеев — химик, составивший карту всех элементов
    Дмитрий Иванович Менделеев родился 8 февраля 1834 года (27 января по старому стилю) в Тобольске, в большой семье директора гимназии. Рос он в трудное время, но мать, по семейным преданиям, сделала всё, чтобы младший сын получил образование. Так будущий учёный оказался в Петербурге.Путь к успехуОкончив Главный педагогический институт, Менделеев стажировался в Европе, а в 1860-х годах стал профессором Петербургского университета. Читая курс неорганической химии, он не нашёл подходящего учебника и ...
  • Роальд Амундсен — покоритель полюсов и северо-западного прохода
    Полярные льды веками хранили свои тайны. Роальд Амундсен разгадал сразу несколько из них. Он не искал лёгкой славы: каждый его поход был итогом долгой учёбы у местных народов и внимательного расчёта.Путь к успехуАмундсен родился 16 июля 1872 года недалеко от города Борге в Норвегии. Он собирался стать врачом, но, прочитав о полярных экспедициях, выбрал другую жизнь. В 1897–1899 годах он участвовал в бельгийской экспедиции на судне «Бельжика», которая стала первой, перезимовавшей в Антарктике. Та...
  • Франциск Скорина — первопечатник Беларуси и Восточной Европы
    В 1517 году в Праге вышла небольшая книга, которую можно держать в одной руке. Это была Псалтирь, а на её страницах стояло имя издателя: «Франциск Скорина из Полоцка, в лекарских науках доктор». Так началась история восточнославянского книгопечатания.Путь к книгеТочная дата рождения Скорины неизвестна, обычно называют около 1490 года. Он родился в Полоцке в семье купца. В 1504 году его имя записано среди студентов Краковского университета. В 1512 году в итальянской Падуе он получил степень докто...
  • Марк Шагал — художник, чьи герои парят над городом
    На картинах Марка Шагала люди летают над крышами, скрипач сидит на домике, а синяя корова смотрит на зрителя человеческими глазами. Это не просто фантазия: художник всю жизнь рисовал родной Витебск, каким его хранила память, — с поэтической логикой сна.Путь к успехуМарк Шагал (при рождении Мовша Шагал) родился в 1887 году в семье бедного еврейского рабочего недалеко от Витебска и вырос в самом Витебске. Он учился у местного художника Юделя Пэна, затем уехал в Санкт-Петербург. В 191...
  • Янка Купала — народный поэт Беларуси
    Когда в начале XX века молодой поэт из деревни под Минском подписал свои стихи псевдонимом «Янка Купала», он, возможно, и не думал, что станет голосом целого народа. Но именно так и произошло.Путь к успехуИван Доминикович Луцевич родился в 1882 году в фольварке Вязынка близ Молодечно. Семья была небогатой: родители арендовали землю. Учился он в народном училище, потом работал домашним учителем, писарем, помощником провизора, много читал и рано начал писать стихи. Первое стихотворение «Мужик» нап...
  • Луи Пастер — учёный, победивший невидимых врагов
    Луи Пастер родился 27 декабря 1822 года в городке Доль на востоке Франции, в семье кожевника. Он был прилежным, но не блестящим учеником и интересовался живописью. Однако судьбу решила химия: она повела его от кристаллов к микробам и спасению жизней.Путь к успехуПервое крупное открытие Пастер сделал в 1848 году, изучая кристаллы солей винной кислоты. Он заметил, что они бывают двух зеркально отражённых форм, и тем самым заложил основы стереохимии. Позже он занялся брожением и показал, что за нег...
МатематикаМоя статистика

Тест по PowerBuilder

100 вопросов в 10 темах (лёгкий — 35, средний — 40, сложный — 25). Выберите темы, уровень и количество вопросов — к каждому ответу есть объяснение.

PowerScript, события и функции, наследование, DataWindow и его буферы, транзакции и SQLCA, окна и элементы управления, обработка ошибок и современный PowerBuilder. Вопросы на английском.

Все вопросы теста 100

Нажмите на вариант ответа, чтобы проверить себя, или «Показать ответ».

PowerBuilder basics10
1Лёгкий
Which file extension does a PowerBuilder library, the file that stores the source and compiled form of objects such as windows and menus, have?
  1. .pbd
  2. .pbw
  3. .pbt
  4. .pbl
2Лёгкий
Which object's Open event is the first script to run when a PowerBuilder application starts?
  1. The first window in the library list
  2. The application object
  3. The first user object created by the application
  4. The main menu object
3Средний
What does a PowerBuilder target (.pbt file) define?
  1. An application object together with its ordered library list of .pbl files
  2. The database profiles used by the Database painter
  3. A compiled runtime package ready to copy to users
  4. A group of several applications opened together in the IDE
4Средний
Two libraries in a target's library list both contain a window named w_main. Which one does the application use?
  1. Neither — the target refuses to build until one is deleted
  2. The one that was modified most recently
  3. The one in the library listed first in the library list
  4. The one in the library listed last, because later libraries override earlier ones
5Сложный
A project is set to build PowerBuilder dynamic libraries (.pbd) rather than machine-code DLLs. What do the .pbd files contain?
  1. The full source code of the objects, compiled when the application starts
  2. Native machine code that runs without any PowerBuilder runtime files
  3. Only the DataWindow objects, while all scripts go into the .exe
  4. The objects compiled to Pcode, without their source, executed by the PowerBuilder runtime
6Лёгкий
You need a reusable object that holds business logic and has no visual interface. What do you create?
  1. A standard visual user object
  2. A custom class (nonvisual) user object
  3. A menu object
  4. A DataWindow object
7Лёгкий
How is a menu object m_main attached to a window?
  1. By giving the menu the same name as the window
  2. Through the window's MenuName property
  3. By dragging m_main into the window's library
  4. By calling m_main.Attach(w_main)
8Средний
The application object's Open event connects to the database but does not open any window. What happens when the event script finishes?
  1. The first window in the library list is opened automatically
  2. An empty default main window is shown
  3. The application ends, because no window is open
  4. The application keeps running invisibly until it is killed
9Средний
You copy only app.exe and its .pbd files to a clean PC, and the program does not start. What is missing?
  1. The workspace (.pbw) and target (.pbt) files
  2. The .pbl source libraries
  3. The PowerBuilder runtime files (such as pbvm.dll) of the same version and build, plus the database driver
  4. The PowerBuilder IDE
10Средний
What does an incremental build of a target do, compared with a full build?
  1. It recompiles only objects that changed and the objects that depend on them
  2. It recompiles every object in every library
  3. It only checks syntax without producing compiled code
  4. It compiles only the object currently open in the painter
PowerScript syntax10
11Лёгкий
How do you write a single-line comment in PowerScript?
  1. -- this is a comment
  2. ' this is a comment
  3. // this is a comment
  4. # this is a comment
12Лёгкий
Which character continues a PowerScript statement on the next line?
ls_sql = "SELECT emp_id, emp_name " + ?
         "FROM employee"
  1. +
  2. \
  3. &
  4. _
13Средний
A window declares ii_count in its instance variables. Which statement describes ii_count?
// Declare Instance Variables of w_order
integer ii_count
  1. Each open instance of w_order has its own ii_count, usable in all scripts of the window and its controls
  2. It is visible in every object of the application
  3. It exists only while the current event script is running
  4. All open instances of w_order share one ii_count
14Средний
What does the message box display?
integer li_count
string  ls_name

MessageBox("Info", String(li_count) + "[" + ls_name + "]")
  1. 0[]
  2. A runtime error: variable used before assignment
  3. -1[]
  4. An empty message, because both variables are NULL
15Сложный
What does IsNull(ls_c) return after this code?
string ls_a, ls_b, ls_c
ls_a = "x"
SetNull(ls_b)
ls_c = ls_a + ls_b
  1. TRUE
  2. The concatenation raises a runtime error, so IsNull is never reached
  3. FALSE, and ls_c is an empty string
  4. FALSE, and ls_c is "x"
16Средний
What is ls_r after this code?
integer li_n = 7
string  ls_r

CHOOSE CASE li_n
   CASE 1 TO 5
      ls_r = "low"
   CASE IS > 5
      ls_r = "high"
   CASE ELSE
      ls_r = "other"
END CHOOSE
  1. "" because CASE IS cannot compare with >
  2. "high"
  3. "low"
  4. "other"
17Лёгкий
How many times does the loop body run?
FOR li_i = 1 TO 10 STEP 2
   li_count = li_count + 1
NEXT
  1. 5
  2. 4
  3. 10
  4. 6
18Сложный
What is li_n after this code?
integer li_i = 10, li_n = 0

DO WHILE li_i < 5
   li_n++
   li_i++
LOOP

DO
   li_n++
   li_i++
LOOP UNTIL li_i > 5
  1. 2
  2. 1
  3. The second loop never ends
  4. 0
19Сложный
w_doc declares a shared variable si_opened and adds 1 to it in its Open event. Three instances of w_doc are opened one after another. What is si_opened in the third instance?
// Declare Shared Variables of w_doc
integer si_opened

// w_doc Open event
si_opened = si_opened + 1
  1. 3
  2. 1
  3. It differs by instance: 1, 2 and 3 respectively, read at the same time
  4. 0
20Лёгкий
Which operator means "not equal" in PowerScript?
  1. ~=
  2. !=
  3. #
  4. <>
Events and functions10
21Лёгкий
Which window event runs after the window is opened by Open() but before it is displayed, and is the usual place for initialization code?
  1. Activate
  2. Open
  3. Show
  4. Constructor
22Средний
In what order are the three message boxes shown when cb_1 is clicked? (cb_2's Clicked event shows "3".)
// cb_1 Clicked event
MessageBox("Step", "1")
cb_2.PostEvent(Clicked!)
MessageBox("Step", "2")
  1. 1, 3, 2
  2. 3, 1, 2
  3. 1, 2 — a posted event never runs while the window is open
  4. 1, 2, 3
23Средний
The descendant's Clicked script overrides the ancestor script. Which statement explicitly runs the ancestor's Clicked script from it?
  1. This.TriggerEvent("ancestor")
  2. Parent.Clicked()
  3. Ancestor::Clicked()
  4. CALL Super::Clicked
24Сложный
Window w_main contains a single-line edit sle_1. In which order do these scripts run when w_main is opened?
  1. sle_1 Constructor, then w_main Open
  2. The order is not defined and can change from run to run
  3. w_main Open, then sle_1 Constructor
  4. sle_1 Constructor runs only when sle_1 first receives focus
25Сложный
What is true about the return value of a function or event called with the POST keyword, e.g. This.EVENT POST ue_calc()?
  1. It is returned as usual, just after a short delay
  2. It is not available: the call is only queued and runs after the current script ends
  3. It is stored in Message.LongParm when the posted call finishes
  4. It is always 1 if the call was queued successfully
26Сложный
cb_ok has no script in its Clicked event. What does this call return?
li_rc = cb_ok.TriggerEvent(Clicked!)
  1. NULL
  2. 1
  3. 0
  4. -1
27Лёгкий
You want an event named ue_save on a window that other scripts can trigger. What is it called in PowerBuilder?
  1. A system event
  2. A global function
  3. A user event, defined on the window and optionally mapped to an event ID
  4. An external function
28Средний
Which statement about object functions compared with events is true?
  1. Only events can take arguments
  2. Functions can be declared private or protected, while events are always public
  3. Functions run asynchronously, events synchronously
  4. Events can return values, functions cannot
29Лёгкий
What does a window's CloseQuery event script do if it returns 1?
  1. It closes the window without saving
  2. It closes all other windows too
  3. It shows the standard "Save changes?" dialog
  4. It prevents the window from closing
30Лёгкий
Which line runs the Clicked event script of cb_save immediately, from another script?
  1. Clicked(cb_save)
  2. cb_save.Clicked()
  3. cb_save.TriggerEvent(Clicked!)
  4. cb_save.RunEvent("Clicked")
Inheritance and objects10
31Лёгкий
What does visual inheritance let you do with a window w_base?
  1. Display w_base inside another window at runtime
  2. Share one running instance of w_base between several windows
  3. Create a descendant window that inherits its controls, properties and scripts, and then add to or change them
  4. Copy w_base into a new window that no longer depends on it
32Средний
A descendant window has a script in a button's Clicked event, and "Extend Ancestor Script" is checked (the default). What runs when the button is clicked?
  1. The descendant's script, then the ancestor's script
  2. The ancestor's script, then the descendant's script
  3. Only the descendant's script
  4. Only the ancestor's script, unless the descendant calls Super
33Лёгкий
In the Clicked event of a command button placed directly on a window, what does the pronoun Parent refer to?
  1. The button itself
  2. The application object
  3. The window that contains the button
  4. The ancestor of the button's class
34Средний
In a menu item's Clicked script, which pronoun refers to the window that the menu is attached to?
  1. Super
  2. Parent
  3. This
  4. ParentWindow
35Сложный
What does IsValid(lnv_b) return at the end of this script?
n_calc lnv_a, lnv_b
lnv_a = CREATE n_calc
lnv_b = lnv_a
DESTROY lnv_a
  1. FALSE
  2. TRUE, because lnv_b holds its own copy of the object
  3. The assignment lnv_b = lnv_a does not compile for objects
  4. TRUE, until lnv_b goes out of scope
36Средний
A descendant event has "Override Ancestor Script" checked and its own script. What runs when the event fires?
  1. The ancestor script, then the descendant script
  2. Only the descendant script, unless it calls the ancestor with CALL Super::
  3. The descendant script, then the ancestor script
  4. Only the ancestor script
37Средний
What happens on the second line of this script?
n_calc lnv_calc
ld_total = lnv_calc.of_sum(10, 20)
  1. of_sum returns 0
  2. A runtime "null object reference" error, because the object was never created
  3. A compile error, because lnv_calc is not created
  4. of_sum runs normally with default instance variables
38Лёгкий
In a control's event script, what does the pronoun This refer to?
  1. The window that contains the control
  2. The control whose script is running
  3. The ancestor of the control
  4. The application object
39Сложный
n_dog is inherited from n_animal, and both define of_speak(). Which version runs?
n_animal lnv_a
lnv_a = CREATE n_dog
ls_s = lnv_a.of_speak()
  1. Both, ancestor first
  2. n_animal's of_speak, because the variable is declared as n_animal
  3. A compile error: the variable type does not match CREATE
  4. n_dog's of_speak, because the object is an n_dog
40Сложный
A nonvisual user object n_util has its AutoInstantiate property set. What changes in how you use it?
n_util lnv_util
ls_x = lnv_util.of_format(ld_value)
  1. It is created once per application and shared by all variables
  2. It is created when the application starts, even if never declared
  3. It must still be created with CREATE, but DESTROY is automatic
  4. It is created automatically when the variable is declared and destroyed when it goes out of scope, so no CREATE or DESTROY is needed
DataWindow basics10
41Лёгкий
Which property of a DataWindow control specifies which DataWindow object it displays?
  1. DataSource
  2. DataObject
  3. SQLSelect
  4. DWObject
42Лёгкий
Before calling dw_1.Retrieve() on a DataWindow whose data source is SQL, what must the script do?
  1. Assign a connected transaction object, e.g. dw_1.SetTransObject(SQLCA)
  2. Call dw_1.Reset() to allocate the buffers
  3. Call dw_1.Update() to open the cursor
  4. Nothing; the control connects to SQLCA automatically
43Средний
dw_1.Retrieve() returns 0. What does that mean?
  1. The retrieval failed because of a database error
  2. The retrieval succeeded but no rows matched
  3. The DataWindow has no transaction object
  4. The retrieval was cancelled by the user
44Сложный
What is the difference between dw_1.SetTransObject(SQLCA) and dw_1.SetTrans(SQLCA)?
  1. SetTransObject works only for Retrieve, SetTrans only for Update
  2. They are identical; SetTrans is just the older name
  3. SetTransObject uses your connected transaction object as is; SetTrans copies its values into an internal one and the DataWindow connects and disconnects on each Retrieve or Update
  4. SetTrans uses your connection; SetTransObject opens a new private connection
45Лёгкий
Which DataWindow presentation style shows rows and columns with grid lines, and lets the user resize and reorder columns at runtime, like a spreadsheet?
  1. Freeform
  2. Composite
  3. Grid
  4. Label
46Лёгкий
The DataWindow's SQL has a retrieval argument :as_state used in its WHERE clause. How do you pass the value "CA" to it?
  1. dw_1.Retrieve("CA")
  2. dw_1.Object.as_state = "CA"
  3. dw_1.Retrieve(as_state = "CA")
  4. dw_1.SetArgument("as_state", "CA")
47Средний
Which SQL statements does dw_1.Update() send for an updatable DataWindow?
  1. Only UPDATE statements; inserts need embedded SQL
  2. INSERT for new modified rows, UPDATE for modified retrieved rows, DELETE for retrieved rows in the Delete buffer
  3. DELETE of all rows followed by INSERT of the current rows
  4. One UPDATE for every row in the Primary buffer
48Средний
Which DataWindow data source do you choose when the data does not come from a database and the script fills the rows itself?
  1. Quick Select
  2. External
  3. Query
  4. Stored Procedure
49Лёгкий
What does dw_1.Reset() do?
  1. Deletes all rows from the database table
  2. Removes all rows from all buffers without changing the database
  3. Undoes changes since the last Update
  4. Re-executes the last Retrieve
50Сложный
A DataWindow's SQL joins the orders and customers tables. What can dw_1.Update() do with it?
  1. Nothing; joined DataWindows can never be updated
  2. Update whichever table has more modified columns
  3. Update both tables automatically in one call
  4. Update one table at a time — the one set in Update Properties; for the other you change the update settings with Modify and call Update again
DataWindow programming10
51Лёгкий
Which line is equivalent to ls_name = dw_1.GetItemString(5, "emp_name")?
  1. ls_name = dw_1.Object.emp_name[5]
  2. ls_name = dw_1.emp_name[5]
  3. ls_name = dw_1.Object[5].emp_name
  4. ls_name = dw_1.GetItem(5).emp_name
52Средний
A row that was retrieved from the database is removed with dw_1.DeleteRow(3). Where does it go?
  1. To the Filter buffer
  2. To the Delete buffer, so the next Update generates a DELETE for it
  3. It is discarded at once and cannot affect the database
  4. It stays in the Primary buffer, marked as deleted
53Средний
dw_1 holds 10 rows; 4 of them have status = 'A'. What is ll_rows?
dw_1.SetFilter("status = 'A'")
dw_1.Filter()
ll_rows = dw_1.RowCount()
  1. 6
  2. 10
  3. 0, because SetFilter must be called after Filter
  4. 4
54Сложный
In a DataWindow's ItemChanged event, which return value rejects the new value and keeps the focus in the column?
  1. RETURN 2
  2. RETURN -1
  3. RETURN 1
  4. RETURN 0
55Сложный
In dw_1's ItemChanged event for column emp_name, what does this line return?
ls_value = This.GetItemString(row, "emp_name")
  1. An empty string until the event finishes
  2. The new value the user just typed
  3. NULL, because the column is being edited
  4. The old value; the new value is in the event's data argument
56Средний
What is the row status after this code?
ll_row = dw_1.InsertRow(0)
dw_1.SetItem(ll_row, "emp_name", "Ann")
ls_status = String(dw_1.GetItemStatus(ll_row, 0, Primary!))
  1. NewModified!
  2. NotModified!
  3. DataModified!
  4. New!
57Лёгкий
After dw_1.SetSort("salary D") the rows on screen stay in the same order. What is missing?
  1. A call to dw_1.Filter()
  2. A call to dw_1.Retrieve()
  3. A call to dw_1.Sort()
  4. Nothing; "D" means "default order"
58Сложный
Two DataWindows must be saved in one transaction. Why is the first Update called with resetflag FALSE?
IF dw_order.Update(TRUE, FALSE) = 1 THEN
   IF dw_items.Update(TRUE, FALSE) = 1 THEN
      dw_order.ResetUpdate()
      dw_items.ResetUpdate()
      COMMIT USING SQLCA;
   ELSE
      ROLLBACK USING SQLCA;
   END IF
ELSE
   ROLLBACK USING SQLCA;
END IF
  1. So dw_order keeps its row status flags if dw_items fails and the transaction is rolled back
  2. So the DataWindow re-retrieves its rows after updating
  3. So AcceptText is skipped for speed
  4. So the changes are committed immediately
59Сложный
In a DataWindow's ItemError event, which return value rejects the invalid value without showing PowerBuilder's default error message box?
  1. RETURN 0
  2. RETURN 2
  3. RETURN 1
  4. RETURN 3
60Средний
A user types a new name into dw_1 and clicks a toolbar button whose script calls dw_1.GetItemString(1, "emp_name"). The old name is returned. Why?
  1. The row must be re-retrieved after each change
  2. GetItemString always returns the value as originally retrieved
  3. The typed text is still in the edit control; call dw_1.AcceptText() first to validate and store it
  4. Toolbar clicks run before the keyboard input is processed
Database and transactions10
61Лёгкий
What is SQLCA in a PowerBuilder application?
  1. The DataWindow that stores query results
  2. A system function that runs SQL strings
  3. The default global transaction object used for database connections
  4. The name of the database driver DLL
62Лёгкий
After an embedded SELECT ... INTO statement, SQLCA.SQLCode is 100. What does it mean?
  1. A database error occurred
  2. The statement succeeded and returned exactly one row
  3. 100 rows were found
  4. No row was found
63Средний
An embedded SQL statement fails and SQLCA.SQLCode is -1. Which property holds the database's error message?
  1. SQLCA.SQLMessage
  2. SQLCA.SQLErrText
  3. SQLCA.ErrorMessage
  4. SQLCA.LastError
64Средний
Why are emp_name and ll_id written with a colon in this embedded SQL?
SELECT emp_name INTO :ls_name
  FROM employee
 WHERE emp_id = :ll_id
 USING SQLCA;
  1. The colon marks PowerScript variables (host variables) inside the SQL statement
  2. The colon is needed only for string variables
  3. The colon tells the database to bind them as output parameters only
  4. The colon makes the parameters optional
65Сложный
This singleton SELECT matches three rows in the table. What is SQLCA.SQLCode afterwards?
SELECT emp_name INTO :ls_name
  FROM employee
 WHERE dept_id = 10
 USING SQLCA;
  1. -1, because a singleton SELECT returned more than one row
  2. 0, and ls_name holds the first row
  3. 0, and ls_name holds the last row
  4. 100, because no single row could be chosen
66Лёгкий
Which property of a Transaction object names the database interface to use, for example "ODBC"?
  1. DBMS
  2. Database
  3. ServerName
  4. DBParm
67Средний
With SQLCA.AutoCommit = FALSE (the default) and dw_1 using SetTransObject(SQLCA), why is COMMIT needed here?
IF dw_1.Update() = 1 THEN
   COMMIT USING SQLCA;
ELSE
   ROLLBACK USING SQLCA;
END IF
  1. COMMIT re-reads the saved rows into dw_1
  2. It is not needed; Update commits automatically when it returns 1
  3. COMMIT is needed only for Oracle databases
  4. Update only sends the SQL inside the open transaction; it does not commit it
68Средний
A cursor loop reads rows with FETCH. Which condition keeps the loop running while rows remain?
DECLARE c_emp CURSOR FOR
   SELECT emp_name FROM employee USING SQLCA;
OPEN c_emp;
FETCH c_emp INTO :ls_name;
DO WHILE ?
   // process ls_name
   FETCH c_emp INTO :ls_name;
LOOP
CLOSE c_emp;
  1. SQLCA.SQLCode = 100
  2. NOT IsNull(ls_name)
  3. SQLCA.SQLCode <> 100
  4. SQLCA.SQLCode = 0
69Сложный
SQLCA.AutoCommit is TRUE. A script runs two UPDATE statements and then ROLLBACK USING SQLCA. What happens to the updates?
  1. They stay in the database: each statement was committed as soon as it ran
  2. Only the second UPDATE is undone
  3. The ROLLBACK raises a runtime error and closes the connection
  4. Both are undone by the ROLLBACK
70Средний
The application needs a second database connection alongside SQLCA. What do you do?
  1. Set SQLCA.DBParm to list both databases
  2. Call CONNECT USING SQLCA a second time with new properties
  3. Create another Transaction object (CREATE transaction), set its properties and CONNECT USING it
  4. Copy SQLCA into a structure and connect the structure
Windows and controls10
71Лёгкий
Which window type is application-modal, so the user must close it before working in any other window of the application?
  1. Response
  2. Main
  3. Child
  4. Popup
72Средний
How does w_detail read the value "ABC" passed by this call?
OpenWithParm(w_detail, "ABC")
  1. w_detail.Parm property
  2. The first argument of w_detail's Open event
  3. Message.DoubleParm in w_detail's Open event
  4. Message.StringParm in w_detail's Open event
73Средний
A response window closes itself with CloseWithReturn(Parent, "OK"). Where does the calling script find "OK" after its Open(w_confirm) call returns?
  1. In Message.StringParm
  2. In w_confirm.ReturnValue
  3. In a global variable created automatically by CloseWithReturn
  4. In the return value of Open
74Лёгкий
In an MDI application, which call opens w_doc as a sheet inside the frame w_frame?
  1. OpenChild(w_doc, w_frame)
  2. OpenSheet(w_doc, w_frame)
  3. Open(w_doc, MDI!)
  4. w_frame.AddSheet(w_doc)
75Сложный
Why should a window copy Message.StringParm into an instance variable at the very start of its Open event?
  1. Message.StringParm is cleared automatically when the Open event ends
  2. Message is one global object, and later events or OpenWithParm calls can overwrite it
  3. Message.StringParm can be read only once
  4. Instance variables are faster to read than Message properties
76Лёгкий
Which statement in a command button's Clicked event closes the window that contains the button?
  1. Close(Parent)
  2. Parent.Hide()
  3. DESTROY Parent
  4. Close(This)
77Средний
In an MDI application, a frame toolbar item "Save" must act on the sheet the user is working in. Which function returns that sheet?
  1. w_frame.GetFocus()
  2. w_frame.GetActiveSheet()
  3. w_frame.ActiveSheet()
  4. w_frame.GetCurrentWindow()
78Сложный
The script calls Open(w_doc) twice in a row. How many w_doc windows are open afterwards?
  1. One — the second Open just activates the existing window
  2. None — the second call closes the first
  3. One, and the second call raises a runtime error
  4. Two independent instances
79Средний
OpenWithParm(w_edit, lstr_param) passes a structure lstr_param. How does w_edit read it in its Open event?
  1. lstr_param = Message.StructureParm
  2. lstr_param = Message.DoubleParm
  3. lstr_param = Message.StringParm
  4. lstr_param = Message.PowerObjectParm
80Средний
Which statement about a child window is true?
  1. It is modal and blocks the rest of the application
  2. It is the only window type that can have its own menu
  3. It can be moved anywhere on the desktop
  4. It stays inside its parent window's area and moves with the parent
Error handling and debugging10
81Лёгкий
What does li_ret contain if the user clicks No?
li_ret = MessageBox("Save", "Save changes?", Question!, YesNo!)
  1. 0
  2. 2
  3. FALSE
  4. -1
82Средний
What is ls_log after this code, if of_load() throws a RuntimeError?
ls_log = ""
TRY
   ls_log += "A"
   lnv_loader.of_load()
   ls_log += "B"
CATCH (RuntimeError e)
   ls_log += "C"
FINALLY
   ls_log += "D"
END TRY
  1. ACB
  2. ACD
  3. AC
  4. ABCD
83Средний
Which object's event runs when a runtime error (such as a null object reference) is not caught by any TRY/CATCH?
  1. The DataWindow's DBError event
  2. The application object's SystemError event
  3. The Close event of the current window
  4. The active window's Error event
84Лёгкий
In the PowerBuilder debugger, how do you make execution stop at a particular line of a script?
  1. Compile the target with a Full Build
  2. Add the keyword STOP at that line
  3. Add a MessageBox call; the debugger stops at every MessageBox
  4. Set a breakpoint on that line and run the application in debug mode
85Сложный
You create n_ex_invalid inherited from Exception and THROW it inside of_load() without catching it there. What else should be done?
  1. Wrap the THROW in a FINALLY block
  2. Nothing; any exception can be thrown without declaration
  3. Inherit n_ex_invalid from Throwable instead
  4. Declare n_ex_invalid in the Throws clause of of_load's prototype
86Лёгкий
In the application's SystemError event, which global object holds the error number, text, object and line of the runtime error?
  1. Error
  2. Exception
  3. Message
  4. SQLCA
87Средний
lnv_obj was declared but never created. What is ls after this code?
TRY
   lnv_obj.of_run()
CATCH (NullObjectError e1)
   ls = "null"
CATCH (RuntimeError e2)
   ls = "runtime"
END TRY
  1. "null"
  2. "nullruntime"
  3. "runtime"
  4. An empty string, because SystemError handles it
88Сложный
Why do many SystemError event scripts end with HALT CLOSE?
  1. HALT CLOSE is needed to write the error to the Windows event log
  2. HALT CLOSE restarts the application automatically
  3. Once SystemError has a script, PowerBuilder no longer stops the application itself, so the script must end it if continuing is unsafe
  4. Without it, SystemError runs in an endless loop
89Средний
The user clicks Cancel. What is li_ret?
li_ret = MessageBox("Exit", "Save changes before closing?", &
                    Question!, YesNoCancel!, 2)
  1. 3
  2. 0
  3. -1
  4. 2
90Лёгкий
You are paused in the debugger inside a function and want to run the rest of it and stop back in the calling script. Which command do you use?
  1. Step In
  2. Start
  3. Step Out
  4. Step Over
Modern PowerBuilder10
91Лёгкий
Which company originally created PowerBuilder, releasing version 1.0 in the early 1990s?
  1. SAP
  2. Sybase
  3. Appeon
  4. Powersoft
92Средний
Which company develops new versions of PowerBuilder (PowerBuilder 2017 and later)?
  1. Embarcadero
  2. Microsoft
  3. Appeon
  4. Oracle
93Средний
What does Appeon PowerServer do for a PowerBuilder client/server application?
  1. Replaces the DataWindow with Java Swing tables
  2. Runs the unchanged client/server .exe on a terminal server
  3. Deploys it as an installable cloud app whose data access runs through a C#/.NET Web API on a server
  4. Converts the application into a static HTML website
94Сложный
Which RESTClient function retrieves JSON from a web service URL straight into a DataWindow?
  1. dw_1.Retrieve(ls_url)
  2. dw_1.ImportJson(ls_url)
  3. lnv_client.Retrieve(dw_1, ls_url)
  4. lnv_client.SendGetRequest(dw_1, ls_url)
95Средний
Why does the "solution" format introduced in PowerBuilder 2022 work better with Git than the classic workspace with .pbl files?
  1. Each object's source is stored as a separate text file in folders instead of inside binary .pbl files
  2. It stores the whole application in one large XML file
  3. It compiles objects into .NET assemblies that Git can diff
  4. It keeps source code in a database table instead of files
96Лёгкий
Which was the first PowerBuilder version released by Appeon?
  1. PowerBuilder 2019
  2. PowerBuilder 12.6
  3. PowerBuilder 2017
  4. PowerBuilder 10
97Сложный
When does JSONParser.LoadString(ls_json) indicate success?
  1. When it returns the root item handle
  2. When it returns TRUE
  3. When it returns an empty string; otherwise it returns the error message
  4. When it returns 1
98Средний
After lnv_http.SendRequest("GET", ls_url) succeeds, how do you get the response text from an HTTPClient object?
  1. ls_body = lnv_http.Response
  2. ls_body = lnv_http.ReadAll()
  3. ls_body = Message.StringParm
  4. lnv_http.GetResponseBody(ls_body)
99Лёгкий
Which DataWindow function (PowerBuilder 2017 R2 and later) returns the DataWindow's data as a JSON string?
  1. GenerateJson()
  2. GetJson()
  3. ToJson()
  4. ExportJson()
100Сложный
Which PowerScript objects (PowerBuilder 2019 R2 and later) let you load a .NET assembly and call methods of its classes directly?
  1. OLEObject and OLECustomControl
  2. DotNetAssembly and DotNetObject
  3. RESTClient and JSONParser
  4. ConnectionObject and Proxy

Как проходить тест

  • Выберите темы и уровень — лёгкий уровень проверяет определения и задачи в одно действие, средний — стандартные вычисления, сложный — многошаговые задачи и теорию.
  • Отвечайте касанием или с клавиатуры: 1–4 или A–D, Enter — следующий вопрос.
  • Читайте объяснения — после ошибки разбор открывается сразу, после верного ответа его можно раскрыть кнопкой «Почему».
  • Работайте над ошибками — «Повторить ошибки» в конце теста или режим «Только мои ошибки» потом: ответы запоминаются в этом браузере.

Незавершённый тест сохраняется — после перезагрузки страницы можно продолжить с того же вопроса.

Темы теста

  • PowerBuilder basics 10
  • PowerScript syntax 10
  • Events and functions 10
  • Inheritance and objects 10
  • DataWindow basics 10
  • DataWindow programming 10
  • Database and transactions 10
  • Windows and controls 10
  • Error handling and debugging 10
  • Modern PowerBuilder 10