Powerbuilder Programmer Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Powerbuilder Programmer Interview Questions & Answers

Are you a person with a degree in computer engineering and good in analysing, designing, development, testing and implementation of Software applications? Are you a person with commendable interaction with on-site team, end-users or other groups comfortably then login to Wisdom Jobs online site which helps you to find out the current job positions in the market. you will get latest updates about your relevant job search and details of the power builder programmer jobs. PowerBuilder programmer should understand and analyse requirements from project management teams. He should develop and unite test software for new product features, analyse and resolve software defects. So track your career as Power builder programmer, Analyst, Developer and Client Programmer by looking into Power builder programmer job interview question and answers given.

Powerbuilder Programmer Interview Questions

Powerbuilder Programmer Interview Questions
    1. Question 1. What Is The User-defined Function?

      Answer :

      A user define function is a collection of power script statements that perform some processing.

      Two types of user define function :

      Global function : Accessible any whare in the application.

      Object Level function :Object Level functions are defined for a window, menu, user object or application object.

    2. Question 2. What Are The Passing Arguments?

      Answer :

      PassByValue : When an argument is passed by value the function can accesses the temperory local copy of the arguments and can change the value of the local copy.

      PassByRef: When an argument is passed by reference the function can accesses the original value of the argument and can change it directly.

      PassbyReadOnly: When an argument is passed by read-only we can’t change its value but we can change the value of the argument but we can’t assign another object to that object.

    3. Question 3. What Are The Scope Variables?

      Answer :

      Local: Local variable is a temporary variable only declared in the script itself and they are available only in the script where they were declared, when the script is finished execution the local variable is destroyed.

      Instance: Intance variable that belongs to an object and associated with an instance of object. It allows values to be shared between scripts in the same object.

      Shared: Shared variable retain their value when an object is closed and opened again.

      Global: Global variabl can access anywhere in the application. Can access any object in the application. It has public access level.

    4. Question 4. What Events Do You Know For The Application Object?

      Answer :

      OPEN: the user starts application.

      IDLE: No mouse or keyboard activity happens in a specified number of seconds SystemError - A serious error occurred during execution.

      CLOSE: The user closes the application

      ConnectionBegin: In a distributed computing environment, occurs on the server when a client establishes a connection to the server by calling the ConnectToServer function.

      ConnectionEnd: In a distributed computing environment, occurs on the server when a client disconnects from the server by calling the DisconnectServer function.

    5. Question 5. How Can You Run Another Application From Within Powerbuilder?

      Answer :

      We could do it using PB function Run(). Run(string{, WindowState}), where string is a string whose value is the filename of the program we want to execute. Optionally, the string can contain one or more parameters of the program; WindowState (optional) is a value of the WindowState enumerated data type indicating the state in which we want to run the program.

      E.g., Run(“c:windowsnotepad.exe”, Maximized!)

    6. Question 6. How Do You Avoid Messagebox “application Is Already Running”?

      Answer :

      Use Handle() function. Handle() returns the object’s name if the object exists.

    7. Question 7. What Do You Mean Structures And Types?

      Answer :

      A structure is a collection of one or more related variable of the same or different data types grouped under a single name.

      Global:

      Not associated with any objects.

      Object Level:

      Associated with particular types of windows, menu or user object.

    8. Question 8. What Are The Two Structures Every Application Has?

      Answer :

      Every PowerBuilder application has the MessageObject and the ErrorObject. ErrorObject is used to report errors during execution. MessageObject to process messages that are not PowerBuilder-defined events, and pass parameters between windows.

    9. Question 9. What Are The Ways To Close Your Application?

      Answer :

      • HALT
      • HALT CLOSE
      • CLOSE

    10. Question 10. What Is Halt? Halt Close? What Is The Difference Between Them?

      Answer :

      HALT : 

      Halt statement forces the application to terminate immediately. This is most often used to shut down the application after a serious error occurred.

      HALT CLOSE : 

      Halt Close does the same thing but triggers the application object’s Close event before terminating.

    11. Question 11. What Is The Purpose Of The Pb.ini Files?

      Answer :

      INI stands for “initialization”. They are primarily intended to be a standard format that applications can make use of to hold info from one run to the next. Rather than hard-coding the values of transaction properties in scripts, which is too inflexible for most real-world applications, you’ll want your scripts to read some or all of them from an .INI file. You could use PB.INI .INIs are always in the same format:

      [Database]
      DBMS = Sybase
      Database = Video Store DB
      User Id =
      DB Password =
      Log Password =
      Server Name =
      Log Id=
      Lock =
      DBParm=ConnectString=‘DSN=VideoStore DB;UID=dba’

    12. Question 12. How Do You Manipulate .ini File Through Powerbuilder Functions?

      Answer :

      • Set Profile String()
      • ProfileString()
      • ProfileInt()

    13. Question 13. What Is The Datawindowchild?

      Answer :

      A DropDownDataWindow behaves a child of the DataWindow Object that contains it.

    14. Question 14. What Do You Mean About Data Window?

      Answer :

      A datawindow object is an object that you use to retrieve, present and manipulate data from a relational database or other data source(Such as EXCEL worksheet or DBASE file).

      Retrieves data from a database and present it to the user in a wide variety of styles. 

      We can use datawindow objects in client/server, web-bsed and mult-itier applications.

      The report we can create in Infomaker and the Datawindow objects. We can create in powerbuilder and the same objects.

    15. Question 15. Explain Types Of Presentation Styles Available In Datawindow?

      Answer :

      • Composite
      • Crosstab
      • Freeform
      • Graph
      • Grid
      • Group
      • Label
      • N-up
      • OLE-2.0
      • Richtext
      • Tabular

    16. Question 16. Define Datawindow Buffers?

      Answer :

      PRIMARY BUFFER:

      When data is retrieved from the databse by using retrieve() function, it is retrieved into the Primary Buffer and it is the content of this buffer that are displayed in the datawindow.

      Powerbuilder always displays the data in datawindow control from the Primary Buffer. Data from other buffers are not visible to the user.

      ORIGINAL BUFFER

      When user modifies a row in the DataWindow the row in the Primary Buffer is modified and the original value is copied into the Original Buffer from the Primary Buffer. Copies data only when the user modify the row for the first time.

      DELTED BUFFER

      When the user deletes a row with the DeleteRow() function, rows are transferred from Primary Buffer to Deleted Buffer.

      FILTERED BUFFER

      When rows are filtered using the SetFilter() function, the filtered rows are display in the DataWindow and don’t match the filterd conditions are moved to the Filtered Buffer. 

      EDIT CONTROL OR DATA BUFFER

      Edit DataWindow Control has one edit control. It contains the current column’s data. When the user modify the data in a column modify data is copied in Edit Control Buffer. The modify data on the screen and the content of the Edit Control are same. But the value in the Primary Buffer has the old data.

    17. Question 17. Define Data Store?

      Answer :

      DataStore is a non-visual DataWindow control. DataStore used for Background processing, processing Embeded SQL and Distributed objects.

      Background Processing: 

      Sometimes we use multiple DataWindow control on the screen to display one single report. But those DataWindows are not usable for printing. So we use hidden DataWindow control for printing.

      Processing Embedded SQL:

      Lot of times we need to use embedded SQL to check whether a particular record is existing in the databse or not. So we can check for the existing record using DataStore.

      Distrubuted Objects:

      We can use DataStore in the server application when we are developing a distributed application.

    18. Question 18. Under What Circumstances Will Powerbuilder Automatically Join Tables That You Select In The Select Painter?

      Answer :

      If we select tables that have one or more columns with identical names, the Select painter automatically displays the join, assuming equality between the two columns.

    19. Question 19. What Presentation Styles Do You Know And When Do You Use Them?

      Answer :

      The Tabular presentation style presents data with the data columns going across the page and headers above each column. As many rows from the database will display at one time as can fit in the DataWindow object. We can reorganize the Tabular presentation style any way we want by moving columns and text. Tabular style is often used when we want to group data.

      The Freeform style presents data with the data columns going down the page and labels next to each column. We can reorganize the default layout any way we want by moving columns and text. Freeform style is often used for data entry form.

      The Grid style presents data in a row-and-column format with grid lines separating rows and columns. Everything we place in a grid DataWindow object must fit in one cell in the grid. We cannot move columns and headings around as we can in the Tabular and Freeform styles. But, unlike the others styles, users can reorder and resize columns with the mouse in a grid DataWindow object during execution.

      The Label style presents data as labels. We choose this style to create mailing labels or other kinds of labels. If we choose the Label style, we are asked to specify the attributes for the label in the Specify Label Specification.

      The N-Up style presents two or more rows of data next to each other. It is similar to the Label style. We can have information from several rows in the database across the page, but the information is not printed on labels. The N-Up presentational style is useful if we have periodic data; we can set it up so each period repeats in a row..

      The Group presentation style provides an easy way to create grouped DW objects, where rows are divided into groups, each of which can have statistics calculated for it. It generates a tabular DW that has one group level and some other grouping properties defined. We can customise the DataWindow in the DataWindow painter workspace.

      The Composite presentation style allows us to combine multiple DWs in the same object. It is handy if we want to print more than one DataWindow on a page.

      The Graph presentation style creates a DataWindow object that is only a graph the underlying data is not displayed. As the data changes, the graph is automatically updated to reflect the new values. We use a graph to enhance the display of information in the DataWindow object such as a tabular or freeform DataWindow.

      Crosstab processes all the data and presents the summary information that we have defined for it. We use if we want to analyse data. Crosstab analyses data in a spreadsheet. Instead of seeing a long series of rows and columns, users can look at a Crosstab that summarises the data.

      OLE 2.0 presentation style using a process called uniform data transfer; info from PB supported data sources can be sent to an OLE 2.0 server application. The OLE 2-compliant application uses the PB supplied data to formulate a graph, map, a spreadsheet or the like to be displayed in the DW.

      RichText presentation style using a RichText DW, you can create letters of other documents by merging info in your DB into a formatted DW. Master word processing oriented features such as headers, footers and multiple fonts are available in an easy-to-use format.

    20. Question 20. Describe The Difference Between The Grid And Tabular Presentation Styles.?

      Answer :

      In the Grid presentation style, we cannot move columns and headings around as we can in the Tabular presentation style but in Grid presentation style users can reorder and resize columns with the mouse during execution.

    21. Question 21. Describe The Difference Between The Labels And N-up Presentation Styles.?

      Answer :

      In N-up style, we can also have information from several rows in the database across the page, but the information is not printed on labels.

    22. Question 22. How Often Must You Set The Transaction Object ?

      Answer :

      Just once when we define the DW control. If we change the association of a DataWindow object with a DataWindow control in a script, we must re-issue the SetTransObject () before the next retrieval or update.

    23. Question 23. What Function Changes The Current Row?

      Answer :

      ScrollToRow()

    24. Question 24. How Would You Define Validation Rules For The Datawindow Object?

      Answer :

      We can define validation rules in the DataWindow painter. We can use the SetValidate() function in a script to set validation rules dynamically (at run time) in a script for DW.

    25. Question 25. What Is The Difference Between A Datawindow Control And Object?

      Answer :

      DataWindow control is a container for a DW object and is placed on the window. DW control has attribute and functions. DataWindow object is a PB object which has connection to database and GUI. DW object has attributes. DataWindow object represents the data source. It encapsulates your database access into a high level object that handles the retrieval and manipulation of data use for displaying data and capturing user input. DataWindow object consist of :

      • data intelligence (perform test validation rules)
      • user interface (presentation style)

      It is used to display data or capture user input. DW is an object that we use to retrieve, present and manipulate data from a relational DB or other data source in an intelligent way. (The DW control is the container for the DW object. The DW object is created using the DW painter; a DW control is placed on the window. A DW object has attributes. A DW control has attributes and functions. A DW object represents the data source. It encapsulates your database access into a high level object that handles the retrieval and manipulation of data. It is used for displaying data and capturing the user input. A DW object consists of data intelligence (performs test validation rules) and user interface (presentation style).

    26. Question 26. What Are The Strongest Points Of Using The Datawindow Control?

      Answer :

      • Displaying data.
      • Entering data.
      • Scrolling.
      • Reporting.

    27. Question 27. What Is The Difference Between Sqlca.sqlcode And The Value Returned By The Dberrorcode() Function?

      Answer :

      The DBErrorCode() function (not SQLCA.SQLCode) checks the results of Database access performed by a DataWindow. We check SQLCA.SQLCode after explicitly issuing embedded SQL statements, such as Commit.

    28. Question 28. Which Feature Of The Datawindow Painter Greatly Simplifies The Creation Of A Report Having Only One Group?

      Answer :

      The easiest way to create a report that has a single group is to select the Group presentation style from the New DataWindow dialog box.

    29. Question 29. Where Is A Query Stored?

      Answer :

      In a .PBL file.

    30. Question 30. How Do You Create A Datawindow Object Dynamically?

      Answer :

      We use SyntaxFromSQL() and Create() 

      functions:

      SQLCA.SyntaxFromSQL(select string, presentation string, Error string)
      dw_1.Create(syntax, Error string)
      dw_1.SetTransObject(SQLCA)
      dw_1.Rerieve()

      To create a DataWindow dynamically we have to:

      1. build a string to hold a SQL Select statement;
      2. build a string to specify the presentation characteristics of the DataWindow object;
      3. associate the syntax and description with an existing DataWindow control;
      4. associate the DataWindow control with a transaction object, and perform a retrieval.

      The DataWindow that is created exists only for the life of the DataWindow control, unless we use the LibraryImport() function to save it in a library. Dynamic DW objects allow us to create and modify DW objects on the fly. To create a DW dynamically, use the Create() function.

      Creating takes two arguments: the name of the DataWindow object that will be replaced by the new DW object, and the syntax for creating the new DW object. We can create the DW object syntax in a script, but it is easier to use the SyntaxFromSQL() to generate the syntax from a SELECT statement.

    31. Question 31. Why Must You Specify The Transaction Object For A Datawindow Control After Creating The Datawindow Object?

      Answer :

      The Create() function must be followed by SetTransObject() function because Create() destroys any previous association between the DataWindow and a transaction object. Then, we can issue a Retrieve().

    32. Question 32. Can You Dynamically Assign A Datawindow Object?

      Answer :

      Yes, using DataWindow’s control attribute “DataObject”. DataWindow control has the attribute DataObject. If we want to change an associated DataWindow object at runtime we need to put a line in the script that changes the value of the DataObject attribute.

      For example:

      dw_1.DataObject = “d_name”

    33. Question 33. Let’s Say, You Share Two Dw Buffers And The Primary Dw Has Some Dddw Columns. Will This Dddw Be Shared Automatically As Well?

      Answer :

      NO. After we have shared 2 DataWindows, we have to share all DropDowns as well. First, we have to get the reference for the Child DataWindow using GetChild() function and then do sharing by using ShareData() function.

      DataWindowChild dwc_1, dwc_2
      dw_1.getchild(“employee”, dwc_1)
      dwc_1.SetTransObject(sqlca)
      dwc_1.Retrieve()
      dw_2.getchild(“employee”, dwc_2)
      dwc_1.ShareData(dwc_2)

    34. Question 34. How Can You Update Multiple Database Tables From One Datawindow?

      Answer :

      Using Modify() function. When a DataWindow is based on a join of multiple tables, we can update all of those tables by modifying attributes DataWindow.Table, UpdateTable and column attributes Update and Key using Modify() function. For example, if the data initially came from DEPARTMENT and EMPLOYEE tables, and DEPARTMENT table was specified as an Update Table when we painted the DataWindow, we need to:

      1. Update the DEPARTMENT table using the Update() function:

      iRet = dw_1.Update (TRUE (AcceptText(), FALSE (ResetBuffer))

      2.Modify the Update characteristics of the DataWindow to point to the Employee table:

      IF iRet = 1 THEN
      dw_1.Modify(“Dep_id.Update = NO”) dw_1.Modify(“Dep_name.Update = NO”)
      dw_1.Modify(“Dep_id.Key = NO”)
      dw_1.Modify(“DataWindow.Table.Updatetable = ‘employee’”)
      dw_1.Modify(“Dep_id.Update = YES”)
      dw_1.Modify(“Dep_name.Update = YES”)
      dw_1.Modify(“Dep_id.Key = YES”)
      dw_1.Update()
      END IF

    35. Question 35. What Is The Method To Validate A Numeric Column In A Datawindow?

      Answer :

      SetValidate()

    36. Question 36. In What Attribute Of The Transaction Object Are The Database-specific Error Codes For Connect/update/retrieve Stored?

      Answer :

      SQLDBCode

    37. Question 37. How Can You Change A Select Statement Of The Datawindow At Runtime?

      Answer :

      We can change the select statement by using functions SetSQLSelect() or by changing the data attributes Table.Select by calling function Modify().

      Modify() is preferable because it works faster.

      dw_1.Modify(“datawindow.Table.Select = ‘Select * from customer’”)

    38. Question 38. What Is An Update Flag?

      Answer :

      We use them when we need to update multiple DataBase tables from one DataWindow.

    39. Question 39. What Is The Difference Between Nested And Composite Reports?

      Answer :

      In a Nested report each report has its own data source. Composite report does not have its own data source-it is just a container for other reports.

    40. Question 40. When Insert Statement Applied In Datawindow What Status Will Be Occurred?

      Answer :

      NEWMODIFIED! When a row is inserted into a DataWindow it is initially has a row status of NEW!, and all columns in a row initially have a column status of NOTMODIFIED!.

    41. Question 41. What Data Sources Do You Know And How Do You Use Them?

      Answer :

      The Data Source determines how we select the data that will be used in the DW object. If the data for the DataWindow object is retrieved from a database, we may choose one of the following Data Sources:

      Quick Select is a select from one or multiple tables that are joined through foreign keys and may include simple selection criteria which appear on the WHERE clause. We can only choose columns, selection criteria, and sorting. We cannot specify grouping before rows retrieved, include computed columns, or specify retrieval arguments.

      SQL Select is an SQL Select statement from one or more tables in a relational database and may include selection criteria that appear on any of the possible Select statement clauses (can include selection criteria (WHERE clause), sorting criteria (ORDER BY clause), grouping criteria (GROUP BY and HAVING clauses), computed columns, one or more arguments to be supplied during execution.

      Query is a predefined SQL Select statement, which must be previously constructed and saved as a Query object.

      Stored Procedure indicates that the DataWindow will execute a Stored Procedure and display the data in the first result set. This Data Source only appears if the DBMS to which PowerBuilder is connected and which supports Stored Procedures. We can specify that the data for a DataWindow object is retrieved through a stored procedure if our DBMS supports Stored Procedures.

      External is used when the data is not in the database and the DataWindow object will be populated from a script or data will be imported from a DDE application. If the data is not in the DB, we select External as the Data Source. This includes the following situations:

      • If the DataWindow object is populated from a script
      • If data is imported from a DDE application
      • If data is imported from an external file, such as a tab-separated text file (.TXT file) or a dBASE file (.DBF file).

      Externalindicates that we have coded a script that supplies the DataWindow object with its data. We use this Data Source when the data is in a .TXT or .DBF file or obtained through DDE. We may also use it when we plan to obtain the data by embedding our own SQL Select statement in a script. With this Data Source the DataWindow object does not issue its own SQL statement. We specify the data columns and their types so that PB can build an appropriate

      DataWindow object to hold the data. These columns make up the result set. In a script, we will need to tell PowerBuilder how to get data into the DataWindow in our application. Typically, we will import data during execution using a PowerScript Import function (such as ImportFile() and ImportString() or do some data manipulation and use the SetItem() function to populate the DataWindow.

    42. Question 42. What Functions Do You Use To Change The Row Status?

      Answer :

      dw_1.SetUpdateStatus()
      dw_1.SetItemStatus()
      dw_1.GetUpdateStatus()
      dw_1.GetItemStatus()

    43. Question 43. How Do You Stop The User From Editing Data That Is Displayed In A Field Of A Datawindow?

      Answer :

      Change the tab value of the field to zero in the DataWindow painter.

    44. Question 44. In Order To Sort The Contents Of A Datawindow, Two Commands Must Be Used. What Are They And What Does Each Do?

      Answer :

      SetSort() and Sort().

      SetSort() defines the sort criteria (primary, secondary sort files - ascending or descending order, etc.).

      Sort() performs the actual sort.

    45. Question 45. What Is The Difference Between Computed Columns And Computed Fields In A Datawindow Object?

      Answer :

      Computed columns are created as a result of a SQL query on the server side.

      Computed fieldsas a result of internal processing by DataWindow on the client side.

    46. Question 46. When You Implement Incremental Search, There Is No Current Row, So How Do You Highlight The Row You Are Looking For?

      Answer :

      SelectRow()
      ll_row = Find()
      if ll_row > 0 then SelectRow (ll_row)

    47. Question 47. What Are Extended Column Attributes? How Can You Change Them Dynamically?

      Answer :

      It’s DataWindow object property (Expressions) which we can change dynamically using Modify() function.

    48. Question 48. What Is A Code Table?

      Answer :

      Specifies whether PowerBuilder uses the code table for the column to validate data.

      Values are Boolean: True–Uses code table to validate data; False–Does not use code table to validate data.

      The appearance of the text is specified by the edit mask.

      Each row in the Code Table is a pair of corresponding values: a display value that user sees and data values-those that are saved in the database.

      Code Tables are used with DropDownListBox and RadioButtons. 

    49. Question 49. How Can You Modify A Code Table During Execution?

      Answer :

      Using GETVALUE() and SETVALUE() functions.

    50. Question 50. How Do You Get The Name Of A Dropdowndatawindow?

      Answer :

      GetChild()

    51. Question 51. How Do You Trap Errors From The Database In The Datawindow?

      Answer :

      Write some code in the DBError Event

      For example:

      IF SQLCA.SQLCode <> 0 THEN
      MessageBox()
      return 1
      END IF

    52. Question 52. What Two Types Of Computed Columns Are Allowed In A Datawindow?

      Answer :

      1. One from the database side
      2. One from the client side

    53. Question 53. How Can You Print Multiple Datawindows?

      Answer :

      We should open the print job by calling the PrintOpen() function. After that, we can print DWs by using PrintDataWindow() function. After that, we close the print job by calling PrintClose(). When we use PrintDataWindow() with PrintOpen() and PrintClose(), we can print several DataWindows in one print job. The info in each DataWindow control starts printing on a new page. 

      Example:

      long job
      job = PrintOpen() //Each DataWindow starts printing on a new page.
      PrintDataWindow(job, dw_EmpHeader)
      PrintDataWindow(job, dw_EmpDetail)
      PrintDataWindow(job, dw_EmpDptSum)
      PrintClose()

    54. Question 54. What Do You Use Computed Fields For?

      Answer :

      We use computed fields if we need some calculation based on column data that change for each retrieved row, some summary statistics system information (as current date and time).

    55. Question 55. How Do You Assign The Transaction Object To The Dw Control?

      Answer :

      We use SETTRANS() or SETTRANSOBJECT().

      When we use SETTRANS(), the DW control uses its own Transaction object and automatically performs connect, disconnect, commit and rollback. The SetTransObject() tells the DW control to share the transaction object with other DW controls. We have to control the database processing and we are responsible for managing database transactions. Application performance is better when we use SetTransObject().

    56. Question 56. How Do You Stop The Retrieval Of The Dw Immediately?

      Answer :

      DBCancel()

    57. Question 57. If The Source For A Dw Is A Stored Procedure And This Stored Procedure Has Parameters, Where Do We Have To Pass These Parameters?

      Answer :

      In the RETRIEVE().

    58. Question 58. What Is The Blob Data Type?

      Answer :

      Unbound data type that stands for binary large object. Usually used to hold pictures in database, window’s wave sound file or MIDI music.

    59. Question 59. Explain The Difference Between Settrans() And Settransobject()?

      Answer :

      SetTransObject() works faster because it doesn’t perform Connect and Disconnect each time we call it. When we specify SetTrans() system Does all transaction Automatically. When we specify SetTransObject() we have to manage all Transaction by ourselves. When we use SetTrans( ) in a script, the DataWindow uses its internal transaction object and automatically connects and disconnects as needed; any errors that occur cause an automatic rollback.

      Use SetTrans() when we want PowerBuilder to manage the database connections automatically because we have a limited number of available connections or will be used the application from a remote location. SetTrans() is appropriate when we are only retrieving data and do not need to hold database locks on records the user is modifying. However, for better performance, we should use SetTransObject().

    60. Question 60. When Would You Use Settrans()?

      Answer :

      We use SetTrans() when only a limited No. of connections to the DB is allowed or we are only retrieving data and do not need to hold DB locks on records the user is modifying.

    61. Question 61. Define ‘retrieve Only As Needed’?

      Answer :

      PowerBuilder displays the first row on the screen when its complete retrieveing. When we scroll downward additional rows are retrieved.

    62. Question 62. Explain Dberror() & Error() Event.?

      Answer :

      DBERROR() event is fired when a database related error occurs.

      ERROR() event at the DataWindow control level is triggered, when a wrong expression is encountered in the object notaiton.

    63. Question 63. Explain Computed Column?

      Answer :

      Computed clumn is a column that we define as a part of the SELECT statement. This values are calculated by the database and send to the PowerBuilder.

    64. Question 64. Explain Computed Field?

      Answer :

      Computed fields are defined in DataWindow bands and PowerBuilder calculates these values, not the database server.

    65. Question 65. What Is Dde?

      Answer :

      DDE means Dynamic Data Exchange. This technology allows two different applications talk to each other under MS-Windows environment and exchange data between them.

    66. Question 66. Explain Triggerevent()?

      Answer :

      TriggerEvent() executes the specifed event’s script right way. All pre-defined events are defined as enumerated data types under TriggerEvent().

      TriggerEvent() function executes synchronously, the next command after this command will not be executed untill thios command is executed completly.

      Return type is :

      Return 1 Successfully Executed.
      Return -1 Invalid.

    67. Question 67. Explain Postevent()?

      Answer :

      PostEvent() will be executed after completing the current script execution. PostEvent() executes asychronously. PostEvent() scripts are bending in the message queue.

    68. Question 68. Explain Different Levels Of Attribute Method Protections?

      Answer :

      Public, Protected, Private, PrivateRead, PrivateWrite, ProtectedRead, ProtectedWrite.

    69. Question 69. Explain Transaction Objects?

      Answer :

      Transaction object contains the necessery informaiton needed to connect to a database. Like user id , password..

      SETTRANSOBJECT()

      SetTransObject tells the DataWindow to use specified transaciton object.

      SETTRANS()

      The DataWindow control connects and disconnects after each Retrieve or Update function while using SetTrans

      When we use SetTrans we can’t update multiple DataWindow object.

    70. Question 70. Explain Sqlsa?

      Answer :

      Dynamic Staging Area is internally used by PowerBuilder and is the connection between execution of a statement and Transaction object. SQLSA contains no.of parameters and SQL statements.

    71. Question 71. Explain Sqlda?

      Answer :

      Dynamic Description Area stores information about input and output parameters. The two principle of dynamic SQL are PREPARE and EXECUTE.

    72. Question 72. Explain Types Of Windows In Pb?

      Answer :

      MAIN: A standlone overlaped window that can be independed of all other windows. Used for single window application.

      CHILD: A window that is dependent on a main window and can only exist within the main(PARENT) window. If minimize the main window as well as the child window is minimizsed. A child window cannot beyond the parent window.

      MDI: MDI window allows to open multiple window as sheet inside it. When a window inside the MDI window it minimize and maximized wheet icon is displayed at the bottom of the MDI window.

      MDIHELP: MDIHELP window has additional feature of a status bar at the bottom of the MDIHELP window. This status bar used to display help text like run time.

      POPUP: POPUP window depends on it parent window. POPUP window will behave like a main window. IT the parent window is minimized POPUP window will be hidden.

      RESPONSE: RESPONSE window equalent of a window dialog box. When a response window is opened from another window the response window can’t minimize and maximize untill the user gives response to the window can»t get another window.

    73. Question 73. Explain Helt Close Keyword?

      Answer :

      When PB encounters HALT without the keyword CLOSE, it immediately terminates the application.

      When PB encouters HALT with the keyword CLOSE, it immediately executed the script for the close event for the application and then terminates the applicaiton.

    74. Question 74. Explain Mdi?

      Answer :

      MDI stand for Multiple Document Interface. It is an application style that allows users to open multiple windows(called sheets) in a single window(called MDI Frame) and to move freely among these sheet.

      MDI has two PB window styles:

      • MDI Frame
      • MDI Frame with MicroHelp

      MDI Frame has three parts:

      • Frame
      • Client Area
      • Sheets

    75. Question 75. When Do You Need To Use .pbd?

      Answer :

      We use .PBD when the number and size of the objects in our application would otherwise make a very large .EXE (1.2 to 1.5 megabytes). we need to share components among several applications. distribute application components selectively, for example, to upgrade an application or fix a bug.

    76. Question 76. When Do You Need To Use A .pbr?

      Answer :

      We create .PBR if we have any dynamically assigned objects, bitmaps or icons and to reduce the number of files we need to distribute with the .EXE. We typically use a .PBR when we have scripts in our application in which we dynamically assign resources to attributes of objects or controls in the application. If we do not use a .PBR, we must distribute various .BMP, .RLE, .ICO files with the application. We must place in .PBD’s any objects that we reference dynamically in scripts in the application.

    77. Question 77. What Is .pbr File?

      Answer :

      PBR file is an ASCII File in which we list resource names or DW object names that were referenced dynamically in the script.

    78. Question 78. What Types Of Menus Available In Powerbuilder?

      Answer :

      • DropDown
      • Cascading
      • Pop-up

    79. Question 79. What Is Regenerate Option In The Library Painter? When Is It Most Useful?

      Answer :

      It compiles all codes of an object(s). Regeneration is important during the development of our PB application. Regeneration is useful :

      when we have an error message with no reason for it;

      When we upgrade to a new version of PB, the new version should regenerate all its source code to update it;

      When we make a change to an ancestor window that has many descendants, the changes can be immediately rippled throughout all child window through regeneration. Regenerating could be called “recompiling”. When you regenerate an entry, PowerBuilder recompiles the source form stored in the library and replaces the existing compiled form with the recompiled form.

    80. Question 80. What Are Non-visual User Objects?

      Answer :

      Non-visual user object is an object that encapsulates attributes and functions but is not visible to the user. NVO is a collection of business user functions. They can be Custom Class and Standard Class. NVOs are useful because they allow you to encapsulate application operations into objects making them easier to develop, manage and maintain and also to encapsulate all security management for an application into a single object.

    81. Question 81. What Are Facilities Of The User Objects?

      Answer :

      We define a component once, then reuse it many times as we need without any additional work.

    82. Question 82. What Does Openuserobject() Do?

      Answer :

      OpenUserObject() adds a user object to the specified window and makes all its properties and controls available to scripts. windowname.OpenUserObject ( userobjectvar, userobjecttype {, x, y } ) This function is used when you want dynamically, at runtime place some user objects on a window. This function displays this user object, makes all its attributes available to scripts. You must open a user object before you can access the attributes of the user object. If you access the user object’s attributes before you open it, it will cause an execution error.

    83. Question 83. How Can You Dynamically Place An User Object On The Window?

      Answer :

      By using functions : OpenUserObject( ), OpenUserObjectWithParm( )

    84. Question 84. What Events Does The Custom Class Have?

      Answer :

      Constructor and Destructor

    85. Question 85. How Is A Custom Visual Userobject Different From A Standard Userobject?

      Answer :

      A custom visual user object is an object that has several controls that work as a unit. A standard visual user object inherits its definition from a standard control. We modify the definition to make the control specific to our applications.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SQL Database Tutorial