InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How Many Event Support An Application? |
|
Answer» SIX EVEN support an APPLICATION. open(),close(),connection BEGIN(),CONNECTIONS(),idle(),system error(). Six even support an application. open(),close(),connection begin(),connections(),idle(),system error(). |
|
| 2. |
Is Power Builder Support Multiple Inheritance? |
|
Answer» No,But you need`multiple INHERITANCE then you can INHERIT one object from other and You make one object as USEROBJECT and then use this userobject INHERITED object. No,But you need`multiple inheritance then you can inherit one object from other and You make one object as userobject and then use this userobject inherited object. |
|
| 3. |
Explain The Type Of Inheritance? |
|
Answer» TWO TYPES of INHERITANCE: SINGLE Inheritance and Multi-level Inheritance. Two types of Inheritance: Single Inheritance and Multi-level Inheritance. |
|
| 4. |
Name Some Of The Pfc Services? |
| Answer» | |
| 5. |
If You Were Experiencing A Gpf In Your Application, How Would You Go About Tracking It Down? |
Answer»
|
|
| 6. |
Explain The Concept Of Inheritance In Pb? |
|
Answer» It is a feature that enables you to build windows, user objects, and menus that are derived from existing objects. When you change an ancestor OBJECT, the changes are reflected in all the descendants and the descendant inherits the ancestor's scripts. Two main features to be noted here are:
It is a feature that enables you to build windows, user objects, and menus that are derived from existing objects. When you change an ancestor object, the changes are reflected in all the descendants and the descendant inherits the ancestor's scripts. Two main features to be noted here are: |
|
| 7. |
Explain Enumerated Data Types In Pb? |
|
Answer» Enumerated data types are specific to POWER Script. They are used as arguments in functions and also to specify the properties of an object or control. A variable of one of the enumerated data types can be ASSIGNED a fixed set of VALUES. For example, the enumerated data TYPE Alignment, which specifies the alignment of text, can be assigned one of the following three values. Center! Left!, and Right. For example:mle_edit.Alignment=Right. Enumerated data types are specific to Power Script. They are used as arguments in functions and also to specify the properties of an object or control. A variable of one of the enumerated data types can be assigned a fixed set of values. For example, the enumerated data type Alignment, which specifies the alignment of text, can be assigned one of the following three values. Center! Left!, and Right. For example:mle_edit.Alignment=Right. |
|
| 8. |
Explain The Concepts Of Embedding And Linking? |
|
Answer» When you embed an object it is SAVED as part of the OLE container object i.e. any changes to the actual object will not reflect in the embedded object. In case of Linking the original object resides where it was and link information is STORED in the OLE container object i.e. any changes to the actual object will reflect in the OLE container object. OCX is an OLE CONTROL that IMPLEMENTS the component-based ARCHITECTURE. When you embed an object it is saved as part of the OLE container object i.e. any changes to the actual object will not reflect in the embedded object. In case of Linking the original object resides where it was and link information is stored in the OLE container object i.e. any changes to the actual object will reflect in the OLE container object. OCX is an OLE control that implements the component-based architecture. |
|
| 9. |
What Is Dde? Which Pb Object Has Dde Related Events Associated With It? |
|
Answer» DDE stands for dynamic data exchange by MEANS of which two APPLICATIONS can TALK to each other and exchange data between them. Examples are RemoteExec & Remote SEND. A PB window has DDE events associated with it. DDE stands for dynamic data exchange by means of which two applications can talk to each other and exchange data between them. Examples are RemoteExec & Remote Send. A PB window has DDE events associated with it. |
|
| 10. |
Explain The Different Types Of Embedded Sql That Can Be Used In Pb Scripting? |
|
Answer» Given below are the SQL statements in scripts that are possible with Sybase ASE:
Given below are the SQL statements in scripts that are possible with Sybase ASE: |
|
| 11. |
I Have A Window, Which Has A Menu, Associated With It. For Some Reason I Have Deleted The Menu And I Am Getting Any Error While Trying To Open The Window. What Needs To Be Done? |
|
Answer» Export the window as a SRW and look for the menu name in the FILE. Once FOUND the menu can be created again and linked to the SOURCE window. Export the window as a SRW and look for the menu name in the file. Once found the menu can be created again and linked to the source window. |
|
| 12. |
Differentiate Between Parent & Parent Window? |
|
Answer» Parent refers to the PB object where the current object is placed. For example parent in a command BUTTON’s script will refer to the WINDOW in which the command button is placed. Parentwindow is used to refer to the window for which the current MENU is attached. Parent refers to the PB object where the current object is placed. For example parent in a command button’s script will refer to the window in which the command button is placed. Parentwindow is used to refer to the window for which the current menu is attached. |
|
| 13. |
Name Three Pb Pronouns Used To Reduce Hard Coding. |
|
Answer» This, PARENT, parentwindow & SUPER. This, parent, parentwindow & super. |
|
| 14. |
How Can I Find Out If The Pr Application Is Connected To The Db Or Not? |
|
Answer» Use the Dbhandle () function. |
|
| 15. |
What Is The Difference Between Trigger Event () And Post Event ()? |
|
Answer» The former EXECUTES the specified event’s SCRIPT RIGHT away while the latter posts the request in the operating system’s MESSAGE queue. The former executes the specified event’s script right away while the latter posts the request in the operating system’s message queue. |
|
| 16. |
If You Create A Response Window And Open That Window In An Mdi Frame Using Open Sheet (), What Would Happen? |
|
Answer» When you OPEN a window in a MDI frame using opensheet () or opensheetwithparm () the window gets the sheet properties IRRESPECTIVE of the window type. If a RESPONSE window is opened using the above functions the window will behave like any other sheet having MAXIMISE, minimize, CLOSE controls etc. When you open a window in a MDI frame using opensheet () or opensheetwithparm () the window gets the sheet properties irrespective of the window type. If a response window is opened using the above functions the window will behave like any other sheet having maximise, minimize, close controls etc. |
|
| 17. |
What Are The Different Types Of Windows In Pb? |
|
Answer» They are main, popup; child, RESPONSE, MDI frame, and MDI frame with microhelp. They are main, popup; child, response, MDI frame, and MDI frame with microhelp. |
|
| 18. |
How Can You Update A Dw That Has A Stored Procedure As A Data Source? |
|
Answer» It can be DONE by GOING to the update properties in the DW by selecting Rows/Update properties from the MENU in the design mode in the DW PAINTER. The tables to be updated can be selected. It can be done by going to the update properties in the DW by selecting Rows/Update properties from the menu in the design mode in the DW painter. The tables to be updated can be selected. |
|
| 19. |
What Is The Event From Which I Can See The Exact Sql Statement Sent To The Db By Power Builder? |
|
Answer» SQLPreview (). SQLPreview (). |
|
| 20. |
How Would You Retrieve Multiple Result Sets In A Single Dw? |
|
Answer» A DW can retrieve only one RESULT set at a time. To retrieve other result sets, you can change the result set number EITHER by modify () or using object notation MAKING sure the number of columns and data types match the existing DW DEFINITION. A DW can retrieve only one result set at a time. To retrieve other result sets, you can change the result set number either by modify () or using object notation making sure the number of columns and data types match the existing DW definition. |
|
| 21. |
If The Application Needs To Display Rows As Soon As They Are Retrieved, What Should Be Done? |
|
Answer» WRITE CODE in the retrievrow () EVENT and also set the asynch attibute in the DBParm PROPERTY in the transaction OBJECT. Write code in the retrievrow () event and also set the asynch attibute in the DBParm property in the transaction object. |
|
| 22. |
What Is The Difference Between A Computed Column And A Computed Field? |
|
Answer» The FORMER is defined as part of the SELECT STATEMENT, (for example sum, avg etc) WHOSE VALUES are calculated by the database, while in the latter the PB client CALCULATES the values. If it is a fat client then computed fields are recommended, else for thin clients it is computed column. The former is defined as part of the SELECT statement, (for example sum, avg etc) whose values are calculated by the database, while in the latter the PB client calculates the values. If it is a fat client then computed fields are recommended, else for thin clients it is computed column. |
|
| 23. |
Explain The Following Error: “rows Changed Between Retrieve And Update”? |
|
Answer» It occurs when a USER updates the data before you update it. PB detects it when you include the timestamp column in the DW or use “key and updateable columns” in the WHERE CLAUSE. The solution to the problem would be to use the reselect row () function to reselect the row that caused the error and GET the latest values for the error row and update the DB again. It occurs when a user updates the data before you update it. PB detects it when you include the timestamp column in the DW or use “key and updateable columns” in the WHERE clause. The solution to the problem would be to use the reselect row () function to reselect the row that caused the error and get the latest values for the error row and update the DB again. |
|
| 24. |
Explain The Dw Validation Rule? |
|
Answer» If the data in a column has changed, it checks for the correctness of the value (both data type and data value) in the PRIMARY buffer. Wrong data type or data value will trigger the ItemError () EVENT. If the data is CORRECT it triggers ITEM changed () event, which if it RETURNS ZERO, triggers itemfocuschanged () event. If the data in a column has changed, it checks for the correctness of the value (both data type and data value) in the primary buffer. Wrong data type or data value will trigger the ItemError () event. If the data is correct it triggers item changed () event, which if it returns ZERO, triggers itemfocuschanged () event. |
|
| 25. |
Application Functionality Would Like To Allow The User To Print Selected Rows. How Is This Done? |
|
Answer» You can COPY the selected rows to a data store or a HIDDEN DW control USING rowscopy () and PRINT the data store or hidden DW control. You can copy the selected rows to a data store or a hidden DW control using rowscopy () and print the data store or hidden DW control. |
|
| 26. |
Can You Use An Array As An Argument To The Dw’s Retrieve () Function? |
|
Answer» Yes, it can be USED when your DWs data source CONTAINS a SELECT STATEMENT with an IN clause. Yes, it can be used when your DWs data source contains a Select statement with an IN clause. |
|
| 27. |
How Do You Change The Sql Statement Of A Dw At Run-time? |
|
Answer» It can be done by linking the DW CONTROL to MODIFY () FUNCTION or using “. OBJECT” notation. It can be done by linking the DW control to modify () function or using “. Object” notation. |
|
| 28. |
Explain The Two Classes Of Pb User Objects And Their Sub Types? |
|
Answer» Uos are custom visual objects that you can BUILD to supplement standard PB objects. UOs can request/display information and respond to mouse or keyboard actions and create a tab page UO. Visual UO – a reusable control/set of controls. For example a set of buttons to function as a unit having scripts associated with them for standard processing. THREE types are:
Class UO – they consist of properties, FUNCTIONS, and events with no visual components.
Uos are custom visual objects that you can build to supplement standard PB objects. UOs can request/display information and respond to mouse or keyboard actions and create a tab page UO. Visual UO – a reusable control/set of controls. For example a set of buttons to function as a unit having scripts associated with them for standard processing. Three types are: Class UO – they consist of properties, functions, and events with no visual components. |
|
| 29. |
Explain Function Overloading With An Example? |
|
Answer» It is a feature in PB where a function is defined with the same name as ANOTHER. The two FUNCTIONS may differ in the number of arguments and also the TYPE of arguments. An example is the Messagebox () function. It is a feature in PB where a function is defined with the same name as another. The two functions may differ in the number of arguments and also the type of arguments. An example is the Messagebox () function. |
|
| 30. |
Explain The Usage Of Settransobject Function With Composite Dws? |
|
Answer» Only this FUNCTION should be used for composite presentation styles acting as containers for other DW objects. If SETTRANS () is used with each DW in a composite DW then disconnect does not occur until PB session ends. It should be used only for pure RETRIEVAL when DB locks need not be held on tables in other words update () functions are not used. Only this function should be used for composite presentation styles acting as containers for other DW objects. If settrans () is used with each DW in a composite DW then disconnect does not occur until PB session ends. It should be used only for pure retrieval when DB locks need not be held on tables in other words update () functions are not used. |
|
| 31. |
Explain Some Performance Considerations That You As A Developer Would Like To Review While Designing Client/server (pb/sybase) Applications? |
|
Answer» An important consideration is the usage of COMMIT/CONNECT statements to maximize performance and limit LOCKING and resource use. Two design CONSIDERATIONS that should be taken care are: Long running connections – if these are NOT ACCEPTABLE then the application should connect to the database only when necessary. If acceptable then COMMITs should be issued as OFTEN as possible so that the changes do in fact occur. More importantly COMMITs should be issued to release any locks placed on DB entities as a result of statements executed during the transaction. Settrans/Settransobject function – if the application functionality requires connections to be kept open and issue periodic COMMITs then Settransobject () should be used or use Settrans () for many short-lived transactions. An important consideration is the usage of COMMIT/CONNECT statements to maximize performance and limit locking and resource use. Two design considerations that should be taken care are: Long running connections – if these are NOT acceptable then the application should connect to the database only when necessary. If acceptable then COMMITs should be issued as often as possible so that the changes do in fact occur. More importantly COMMITs should be issued to release any locks placed on DB entities as a result of statements executed during the transaction. Settrans/Settransobject function – if the application functionality requires connections to be kept open and issue periodic COMMITs then Settransobject () should be used or use Settrans () for many short-lived transactions. |
|
| 32. |
Mention Some Features Of N-up, Composite & Cross Tab Dw Presentation Styles? |
|
Answer» N-Up: two or more ROWS of data displayed next to each other across the page. It is useful for periodic data such as data for each day/week or each month in the quarter. CrossTab: provides a data summary in a row and COLUMN format. Data to be selected from one or more tables, DW cannot be external. Crosstab functions can be used for filters, validation RULES or COMPUTED fields. Composite: - it consists of one or more nested reports. It also serves as a container for other reports and has no data source of its own. The user can specify one DW object to be shown on screen, as many reports as the number of DW OBJECTS can be viewed on screen based on the retrieval arguments specified by the user. N-Up: two or more rows of data displayed next to each other across the page. It is useful for periodic data such as data for each day/week or each month in the quarter. CrossTab: provides a data summary in a row and column format. Data to be selected from one or more tables, DW cannot be external. Crosstab functions can be used for filters, validation rules or computed fields. Composite: - it consists of one or more nested reports. It also serves as a container for other reports and has no data source of its own. The user can specify one DW object to be shown on screen, as many reports as the number of DW objects can be viewed on screen based on the retrieval arguments specified by the user. |
|
| 33. |
Differentiate Between Instance And Shared Variables In Pb? |
Answer»
|
|
| 34. |
Explain The Three Methods Of Passing Arguments To Functions/events In Pb? |
Answer»
|
|
| 35. |
Explain Multi-byte Support For Pb? |
Answer»
|
|
| 36. |
What Is A Dwchild Object? Name Two Events Associated With It? |
|
Answer» A dropdown DW is a DWChild. For example a DW object that POPULATES a COLUMN having the dropdown DW EDIT style is a DWChild object. It does not have any EVENTS ASSOCIATED with it. A dropdown DW is a DWChild. For example a DW object that populates a column having the dropdown DW edit style is a DWChild object. It does not have any events associated with it. |
|
| 37. |
Explain The Steps To Update A Multi-table Dw In Pb? |
|
Answer» The FOLLOWING steps are involved in the process:
The following steps are involved in the process: |
|
| 38. |
Explain How The Auto Commit Property Works In Pb? |
|
Answer» When the Auto Commit property is set to FALSE (default) or 0, PB issues SQL statements inside the scope of a transaction. 1(TRUE) implies statements outside the scope of a transaction (for example when your application requires creating TEMPORARY TABLES).
When Auto Commit is set from FALSE to TRUE, then PB issues a COMMIT STATEMENT by default. When the Auto Commit property is set to FALSE (default) or 0, PB issues SQL statements inside the scope of a transaction. 1(TRUE) implies statements outside the scope of a transaction (for example when your application requires creating temporary tables). When Auto Commit is set from FALSE to TRUE, then PB issues a COMMIT statement by default. |
|
| 39. |
Explain The Different Types Of Data Sources That Can Be Linked To Data Window Controls? |
Answer»
|
|
| 40. |
When Should Internal Transaction Management Be Used? |
|
Answer» It can be used if the number of connections to theDB are LIMITED and ALSO for pure retrieval when COMMIT & ROLLBACK are not application PRIORITIES. It can be used if the number of connections to theDB are limited and also for pure retrieval when COMMIT & ROLLBACK are not application priorities. |
|
| 41. |
Which Are The Pfc Class Libraries In Power Builder? |
|
Answer» PFC is a combination of reusable and extendible classes and framework. The 8 LIBRARIES are:
The 4 extension layer class libraries are pfemain.pbl, pfeapsrv.pbl, pfedwsrv.pbl & knownsrv.pbl. 2 more security RELATED libraries (with no extension layers) are pfcsecad.pbl & pfcsecsc.pbl. PFC is a combination of reusable and extendible classes and framework. The 8 libraries are: The 4 extension layer class libraries are pfemain.pbl, pfeapsrv.pbl, pfedwsrv.pbl & knownsrv.pbl. 2 more security related libraries (with no extension layers) are pfcsecad.pbl & pfcsecsc.pbl. |
|
| 42. |
Explain The “connect String Dbparm” Parameter In Power Builder. |
|
Answer» It specifies the PARAMETERS required to connect to an ODBC data source. PowerBuilder uses these parameters to connect to the database. The SYNTAX is Connect String = 'DSN = data_source_name; {UID = user_Id; PWD = password; driver_specific_parameters}' PowerBuilder generates the Connect String automatically when you DEFINE an ODBC data source and copies it to the DBParm box in the Database Profile Set-up dialog box. This happens before you connect to the data source in PowerBuilder. It specifies the parameters required to connect to an ODBC data source. PowerBuilder uses these parameters to connect to the database. The syntax is Connect String = 'DSN = data_source_name; {UID = user_Id; PWD = password; driver_specific_parameters}' PowerBuilder generates the Connect String automatically when you define an ODBC data source and copies it to the DBParm box in the Database Profile Set-up dialog box. This happens before you connect to the data source in PowerBuilder. |
|
| 43. |
Explain The Components Of Odbc Architecture? |
Answer»
ODBC takes care of LOCATING the Sybase/SQL server address on the network by reading the win.ini/sql.ini files. ODBC takes care of locating the Sybase/SQL server address on the network by reading the win.ini/sql.ini files. |
|
| 44. |
Explain And Differentiate Between Settrans () And Settransobject ()? |
|
Answer» While using settrans () the user need not specify an explicit CONNECT or DISCONNECT statement in the script since PB internally calls them whenever required. As PART of internal transaction management of DW controls, when the DW needs to access the DB, the DW control issues an internal CONNECT, performs data access and then issues an internal DISCONNECT. Settransobject () is used when the user goes for a separate transaction object (example SQLCA) or creates a separate one in the script. The sequences of statements are as follows: Transaction tra_1 tra_1 = CREATE transaction tra_1.DBMS = “ODBC” tra_1.database = “myDB” CONNECT using tra_1 Dw_1. Settransobject (tra_1) Dw_1. Retrieve () While using settrans () the user need not specify an explicit CONNECT or DISCONNECT statement in the script since PB internally calls them whenever required. As part of internal transaction management of DW controls, when the DW needs to access the DB, the DW control issues an internal CONNECT, performs data access and then issues an internal DISCONNECT. Settransobject () is used when the user goes for a separate transaction object (example SQLCA) or creates a separate one in the script. The sequences of statements are as follows: Transaction tra_1 tra_1 = CREATE transaction tra_1.DBMS = “ODBC” tra_1.database = “myDB” CONNECT using tra_1 Dw_1. Settransobject (tra_1) Dw_1. Retrieve () |
|
| 45. |
When Do You Use A Data Pipeline? |
|
Answer» If the user wants to copy DB objects from ONE database to other or copy from one DBMS to another, the data pipeline can be used. The file can be exported from one database and imported to the target database. In the Data Pipeline painter you define a data SOURCE, source database, target database, RETRIEVAL arguments, unions, sorting, SELECTION, and grouping criteria. If the user wants to copy DB objects from one database to other or copy from one DBMS to another, the data pipeline can be used. The file can be exported from one database and imported to the target database. In the Data Pipeline painter you define a data source, source database, target database, retrieval arguments, unions, sorting, selection, and grouping criteria. |
|
| 46. |
Explain The Following Terms: Regeneration, Optimization & Pbd? |
Answer»
|
|
| 47. |
As An Extension Of (8) Above, Mention Two Differences With Data Windows? |
Answer»
|
|
| 48. |
What Is A Data Store? What Type Of Events Does It Support/not Support? |
|
Answer» It is a non-visual DATA WINDOW. For example if you want to retrieve data from a table without showing it, then you can go for data store. It does not support clicked events but supports delete row (), INSERT row (), retrieve () and update (). It also supports ITEM Error () event. It is a non-visual data window. For example if you want to retrieve data from a table without showing it, then you can go for data store. It does not support clicked events but supports delete row (), insert row (), retrieve () and update (). It also supports Item Error () event. |
|
| 49. |
What Is The Difference Between Item Error () And Db Error ()? |
|
Answer» ITEM Error () occurs when the data supplied to a particular column in a table fails some validation rules. For example a DW column designed to ACCEPT only integer values throws this error if a string VALUE is passed. DB Error () occurs when INSERT/UPDATE/DELETE/RETRIEVE fails. When it occurs, the DW Control throws up a message box DESCRIBING the error to the DBMS. The user can also get the appropriate error code and THROW up message boxes. Item Error () occurs when the data supplied to a particular column in a table fails some validation rules. For example a DW column designed to accept only integer values throws this error if a string value is passed. DB Error () occurs when INSERT/UPDATE/DELETE/RETRIEVE fails. When it occurs, the DW Control throws up a message box describing the error to the DBMS. The user can also get the appropriate error code and throw up message boxes. |
|
| 50. |
What Is A Dynamic Data Window? Give An Example Of Why You’d Need To Use A Dynamic Data Window? |
|
Answer» It is a data window that is MODIFIED or created during runtime. CREATE method can be USED to create or replace the current DW object in the DW control with the newly created DW. Settransobject () needs to be reset with the new DW in the control SINCE the earlier ASSOCIATION would have been DESTROYED. It is a data window that is modified or created during runtime. CREATE method can be used to create or replace the current DW object in the DW control with the newly created DW. Settransobject () needs to be reset with the new DW in the control since the earlier association would have been destroyed. |
|