You are on page 1of 5

PB Questions & Answers

1. Buffers
Ans:
a) Original
b) Primary
c) Filter
d) delete

2. Itemstatus
Ans:
a) New - New blank row inserted
b) New modified - Value modified in a new row
c) Data modified - Value modified in an existing row
d) Not modified - Value not modified in existing row
( when records are retrieved for the first time the
item status will be not modified for all rows &
columns)
Use getitemstatus(row,column,buffer) to get the item status
If u give zero for row argument it will return the status of a complete row

3. Sharedata
Ans: Shares data between two or more DWs
Syntax : dwprimary.Sharedata(dwsecondary)

4. Rows/Update properties in datawindow painter


Ans : Allow updates , Table to update , Where clause for update/delete , key
modification, updateable columns and unique key columns

Where clause for update/delete - PB generates SQL statements based on


this property
a) Key columns – Update/Delete statements only for key columns
b) Key and Updateable columns - Update/Delete statements only for key
and updatable columns
c) Key and modified columns - Update/Delete statements only for key
and modified columns

5. Gettext & getitem


Ans :
Gettext : Gets data from edit control. When the user changes a value in a
DataWindow, it is available in the edit control before it is accepted into the
column using Accepttext() function
Getitem : Gets the value of an item for the specified row and column.
6. How do u update 2 tables from a single DW
Ans: After updating first table in usual manner, use modify() function and
change the following
a) UpdateTable
b) Updatewhereclause
c) Updatewhereinkey
d) Each column in the second table as updateable
Set values in the columns and update the DW once again

7. Selectrow & scrolltorow


Ans: Selectrow highlights the row and scrolltorow moves the cursor to the
specified row .
8. How do u trap errors in DW
Ans: Using Return statements in the events of DW. Return 1 will reject the
value and stop the execution. Return 0 will accept the value and proceed.
Return 2 will Reject the value and proceed

9. Datastore and DW
Ans : Datastore is a DW which don’t have the visible properties of DW. Used
for manipulations which don’t require user interaction

10. Importstring
Ans: Inserts data into a DataWindow control, DataStore object, or graph
control from tab-delimited data in a string.

11. how do u cancel a retrieve method


Ans: In RetrieveRow event check for the row number u want and put return 1.

12. Dataobject property


Ans: To change the Datawindow of a Datawindow control

13. how to sort records at the Back End and Front End
Ans:
Back End: Use Order By when generating the Datawindow
Front End : Use Sort Tab in Datawindow

14. how to modify SQL dynamically


Ans: Use GetSqlSelect() and SetSqlSelect() functions

15. Itemchanged, Itemerror and itemfocuschanged

16. Key, syskey, keydown of DW order …………….

17. editchanged and itemchanged


18. how do u modify the column type dynamically
Ans: Use Dwname.Object.column name.editstyle = your style

19. dynamically protecting and unprotecting col in DW based on conditions


Ans: dwname.object.columnname.protect = 1 or 0

20. Datasources of DW

21. Presentation styles of DW

22. DW bands

23. DW unit of measurements


Ans: pixels, PBunits

24. DW col types


Ans: edit, editmask, ddlb,dddw etc.,

25. rowscopy, rowsmove

26. saveas fn

27. rowsasneeded , rowstodisk

28. setredraw method

29. how do u access col values and label values in a DW


Ans: Object.columnname[row].text for labels

30. compare dW object and control

31. how do u create reports


Ans: Same as DWs

32. composite reports


Ans: Contains more than one DW type

33. Scope of variables

34. blob

35. pronouns
Ans: Super, Parent, This
36. Statement continuation and separation
Ans: continuation - &
Seperation - ;
37. Comments

38. Datatypes and type casting functions


Ans: Type casting : Long(), String() etc.,

39. Extending and overriding scripts in inheritance


Ans: Extending : extends the execution to ancestor objects
Overriding : Local script will override the anscestor script
40. can u inherit DW ?
Ans: Yes. Put the DW in an user object and inherit it. Other inheritable objects
are menus, Windows and User Objects.

41. object level functions and global fn, stuructures

42. how do u trigger an event

43. compare post event and triggerevent


Ans: Triggerevent triggers the event immediately and then only continue with
the calling script
Post event triggers the event after the execution of furthur calling script.

44. how do u dynamically call fn and triggers


Ans: Use Trigger event dynamic statement
45. message, error object… global objects

46. how do u pass values bet windows


Ans: Use Opensheetwithparm(windowname,w_mdi,parameter)
Parameter types that can be passed : Stringparm, Longparm and
Powerobjectparm. All stored in Message Object.

47. 4 types of dynamic SQLs


Ans:
a) Format 1 : Use this format to execute a SQL statement that does not
produce a result set and does not require input parameters. You can use
this format to execute all forms of Data Definition Language (DDL).
b) Format 2 : Use this format to execute a SQL statement that does not
produce a result set but does require input parameters. You can use this
format to execute all forms of Data Definition Language (DDL).

c) Format 3 : Use this format to execute a SQL statement that produces a


result set in which the input parameters and result set columns are known
at compile time.
d) Format 4 : Use this format to execute a SQL statement that produces a
result set in which the number of input parameters, or the number of
result-set columns, or both are unknown at compile time.

48. settransobject and settrans


Ans: Settransobject – User control is more. U have to give Commit, Rollback
for each transaction
Settrans - Transaction Management is done by PB

49. window types (especially popup and child)

50. Hows OOPS applied in PB

51. SQLCA properties

52. PFC intro

53. check box and radio button

54. user object types

You might also like