Dynamic Embedded SQL Demo Applications
The
dyndemo.cc
andclidemo.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.
- 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.- Change your current directory to the working directory.
- 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.- Build an ESQL executable from the dynamic ESQL source file (
dyndemo.cc
orclid-emo.c
) by:
- Preprocessing (
dyndemo.cc
only). Theclidemo.c
application requires no preprocessing. It calls directly to the esql32 library functions.- Compiling
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- Linking, as described in this chapter
dyndemo
for the command in Step 5 to work.- Run the
dyndemo
executable against the sports database. For example, on UNIX, rundyndemo
with the following command. Add the appropriate -SV parameters if you are running small clients:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |