Kbase 20511: ADM2. SDO With Temp-Table and BUFFER-COPY With SmartDataBrowser
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
How to use a temp-table inside a SmartDataObject (SDO) that is linked to a SmartDataBrowser (SDB), and how to implement the BUFFER-COPY method to fill the temp-table with the contents of a physical table.
FACT(s) (Environment):
Progress 9.x
SYMPTOM(s):
ADM2
FIX:
You need the following:
- One SmartDataObject (SDO) defined with a temp-table.
- One SmartDataBrowser (SDB).
- One SmartViewer (SV).
- One SmartToolbar (ST).
- A SmartWindow (SW).
- A connection to the Sports2000 DataBase.
Follow these steps to build the example:
1) Open the AppBuilder.
2) Connect to Sports2000 DB.
3) Create a New SDO.
a) Define a temp-table based on Customer inside the SDO.
b) Name the temp-table TTCustomer.
c) Define your Query on TTCustomer.
d) Add the fields:
- CustNum.
- Name.
- Sales Rep.
4) Edit the SDO with the Section Editor:
a) Choose Section Procedures.
b) Choose New and Override InitializeObject.
5) After the RUN SUPER write the following code:
FOR EACH CUSTOMER:
CREATE TTCustomer.
BUFFER-COPY CUSTOMER TO TTCustomer.
END.
6) Save the SDO with name d00001.w.
7) Create a SDB based on the b00001.w SDO.
(Add all fields.)
8) Save the SDB as b00001.w.
9) Create a New SW.
10) Add the SDO d00001.w inside the SW
11) Add the SDB b00001.w inside the SW.
12) Accept the links.
13) Add a ST inside the SW.
14) Accept the links.
15) Save the SW with name W00001.w
16) Run the SW.