sqlapplname() — Set the ESQL Application Name

Sets the name of your ESQL application from within your client program. ESQL uses the first two characters of this name to generate filenames for any SQL r-code files compiled from this point on during application execution.

This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter.:

SYNTAX
int
sqlapplname ( papplname, namlen )
  char  *papplname;    /* INPUT */
  int    namlen;        /* INPUT */ 

papplname

A pointer to a string that contains the application name (limit of 12 characters). ESQL uses the first two characters of papplname as the first two characters of the application’s r-code filenames. If you specify a null string for this value, ESQL generates these filenames entirely as random hexadecimal number strings (plus the .r extension). Use the manifest constant ESQL_MAXAPPLNAME to allocate space for the application name.

namlen

The length of the string that papplname specifies.

NOTES

EXAMPLE

This example sets the name of the application from p1phase to p2phase during execution:

main()
{
   int retcode;
   retcode=sqllogin(0,(char **)0,"-PF application.pf","p1phase");
   /* SQL statements produce r-code filenames prefixed with "p1" */
   if(retcode == -1)
   {
       exit(2);
   }
            .
            .
            .
   sqlapplname("p2phase",7);
   /* SQL statements produce r-code filenames prefixed with "p2" */
            .
            .
            .
} 

SEE ALSO

sqllogin() — Start a Progress ESQL Session


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