How the DataWindow control updates the database – PB Docs 125
How the DataWindow control updates the database When updating the database, the DataWindow control determines the type of SQL statements to generate by looking at the status of each of the rows in the DataWindow buffers. There are four DataWindow item statuses, two of which apply only to rows: Table 2-8: DataWindow item status for…
Letting users redefine the crosstab – PB Docs 125
Letting users redefine the crosstab Availability This technique is available in PowerBuilder and the Web ActiveX. With the CrosstabDialog method, you can allow users to redefine which columns in the retrieved data are associated with the crosstab’s columns, rows, and values during execution. The CrossTabDialog method displays the Crosstab Definition dialog box for the user…
Viewing the underlying data – PB Docs 125
Viewing the underlying data If you want users to be able to see the raw data as well as the cross-tabulated data, you can do one of two things: Place two DataWindow controls on the window or form: one that is associated with the crosstab and one that is associated with a DataWindow object that…
Errors in property and data expressions and the Error event – PB Docs 125
Errors in property and data expressions and the Error event A DataWindow control’s Error event is triggered whenever an error occurs in a data or property expression at execution time. These expressions that refer to data and properties of a DataWindow object might be valid under some execution-time conditions but not others. The Error event…
Retrieve and Update errors and the DBError event – PB Docs 125
Retrieve and Update errors and the DBError event Retrieve and update testing When using the Retrieve or Update method in a DataWindow control, you should test the method’s return code to see whether the activity succeeded. Do not test the SQLCode attribute After issuing a SQL statement (such as CONNECT, COMMIT, or DISCONNECT) or the…
Handling DataWindow errors – PB Docs 125
Handling DataWindow errors There are several types of errors that can occur during DataWindow processing: Data items that are invalid (discussed in “Manipulating data in a DataWindow control”) Failures when retrieving or updating data Attempts to access invalid or nonexistent properties or data This section explains how to handle the last two types of errors….
Accessing the properties of a DataWindow object – PB Docs 125
Accessing the properties of a DataWindow object About DataWindow object properties DataWindow object properties store the information that controls the behavior of a DataWindow object. They are not properties of the DataWindow control, but of the DataWindow object displayed in the control. The DataWindow object is itself made up of individual controls—column, text, graph, and…
Using other DataWindow methods – PB Docs 125
Using other DataWindow methods There are many more methods you can use to perform activities in DataWindow controls. Here are some of the more common ones: Table 2-3: Common methods in DataWindow controls Method Purpose AcceptText Applies the contents of the edit control to the current item in the DataWindow control DeleteRow Removes the specified…
Accessing the items in a DataWindow – PB Docs 125
Accessing the items in a DataWindow You can access data values in a DataWindow by using methods or DataWindow data expressions. Both methods allow you to access data in any buffer and to get original or current values. The method you use depends on how much data you are accessing and whether you know the…
Coding the ItemError event – PB Docs 125
Coding the ItemError event The ItemError event is triggered if there is a problem with the data. By default, it rejects the data value and displays a message box. You can write code for the ItemError event to do some other processing. For example, you can set a code to accept the data value, or…