Dynamic Embedded SQL Demo Applications

The dyndemo.cc and clidemo.c applications demonstrate using various dynamic ESQL statements. When run, the application prompts you to enter an SQL request. Enter your request all on one line and press RETURN. No statement terminator is needed; the RETURN ends of the request. The request is processed and the results are displayed. You are then prompted for another request. To end the demonstration, type QUIT.

Follow these steps to run the dynamic ESQL demo application.

  1. Copy all the files in the ESQL directory to a working directory. The default ESQL directory is $DLC/probuild/esqlc for UNIX and %DLC%\probuild\esql for Windows.
  2. Change your current directory to the working directory.
  3. Create a copy of the Progress sports database in your working directory with the PRODB utility. For more information on the PRODB utility, see the Progress Database Administration Guide and Reference. If you plan to run the application as a small client, place a copy of the sports database procedure library (sports.pl) in the PROPATH of your Open Interface Driver.
  4. Build an ESQL executable from the dynamic ESQL source file (dyndemo.cc or clid-emo.c) by:
    • Preprocessing (dyndemo.cc only). The clidemo.c application requires no preprocessing. It calls directly to the esql32 library functions.
    • Compiling
    • Linking, as described in this chapter
    • NOTE: If you plan to run a large client, when you run PROBUILD, select ESQL LARGE CLIENT (FULL) from the product list to build an executable that can compile dynamic ESQL requests. Also, whichever executable you build, set the name of your executable image to dyndemo for the command in Step 5 to work.

  5. Run the dyndemo executable against the sports database. For example, on UNIX, run dyndemo with the following command. Add the appropriate -SV parameters if you are running small clients:
  6. dyndemo -db sports -1 -trig sports.pl 
    


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095