Applicable Versions: 3.02 Onwards


From version 3.02 DataPA can now use a direct database connection rather than having to access the data through the Progress AppServer. This is only possible where the DataPA has been embedded into a Progress GUI client which already has established database connection(s).


This knowledgebase entry will detail how to setup DataPA to work in this configuration.


In order be able to use DataPA with a direct database connection you need to embed DataPA into your Progress GUI client. You will need to install DataPA to be able to do this and make sure that the Client Server Components feature of the installation has been selected.


Next you need to configure your PROPATH so that your Progress client can access the routines in the DataPA procedure library. There are different versions of the procedure library that should be used according to the version of Progress that you are using. Click this "Which DataPA procedure library should I use with my AppServer?" to take you to a knowledgebase entry which will help you select the correct one to use.


Next you need to add or modify your existing startup procedure for your Progress GUI client to ensure that it runs the program DataPACSLibrary.p persistently and add it to the session of your Progress GUI client. This can be done using the following code and in the ProgSrc folder under your DataPA installation folder there is a program called AppBuilderStartup.p which shows how this is done. 


DEF VAR v-f AS HANDLE NO-UNDO.          
/* Start the DataPA CS Library */
RUN DataPACSLibrary.p PERSISTENT SET v-f.
SESSION:ADD-SUPER-PROCEDURE(v-f).


If you want to use any Progress 4GL functions in DataPA to create subjects or calculated fields then you will also need to run your library of functions persistently and add it to the session of your Progress GUI client. This can be done in a similar way to DataPACSLibrary.p, for example:


DEF VAR v-s AS HANDLE NO-UNDO.          
/* Start the Progress 4GL function Library */
RUN MyFunctionLibrary.p PERSISTENT SET v-s.
SESSION:ADD-SUPER-PROCEDURE(v-s).


You will also need to ensure that the databases you want to use with DataPA are connected and use the logical database names that you want. An example shortcut can be found in the ProgSrc folder under your DataPA installation folder called sports2000.lnk. This shows how you can connect to a database in the c:\openedge\wrk folder called sports2000 and then runs the startup program AppBuilderStartup.p.


Once you have started your Progress session you can use the Procedures button () on the PRO*Tools window to see if your procedures are running persistently in the session of your Progress 4GL client.



Next you can start to create you Progress GUI client application with DataPA embedded into it. An example using the DataPA report designer has been included in the installation. This is called DataPADesigner.w and can be found in the ProgSrc folder under the DataPA installation folder.

If you look at the main block of this Progress window you will see the following three lines of code immediately before the WAIT-FOR statement.


PAReports = chCtrlFrame:PAReports.
chDataPA = pAReports:applicationobject.
RUN EnableEvents (INPUT-OUTPUT chDataPA).
 


What these lines of code are doing is switching on the events DataPA uses to communicate with the Progress 4GL client. The first two lines are obtaining the DataPA automation object from the DataPA reports control and the third is enabling the events. If you are not using DataPA reports control and are working directly with the DataPA automation object then the first two lines will not be necessary.


If you now run the DataPADesigner.w window you will see application running.


If you select Modify Setup and then Setup from the outlook bar on the left of the window you will be taken into the DataPA Setup screen. In there you can create a new system which will use your direct connection.

  1. To do this first select the Systems tab and then select the New button or menu option. This will open the DataPA System wizard to allow you to create a new System.
  2. Enter a name for the System and click next.
  3. Then select the option Progress system and click next.
  4. Next you must add a connection to the System. To do this select the Add button.
  5. Then in the Connection Type box select the Embedded Client Server option.
  6. Next enter a name for the connection in the Connection Name box.
  7. Finally click the OK button. At this point the connection should be tested and you will be informed whether it has been successful or not.
  8. Back in the System wizard click next and then finish.
  9. Save your new system by selecting the Save button or menu option in the DataPA Setup screen.

You are now ready to start configuring DataPA just as if you were using an AppServer connection.