[Top] [Prev] [Next] [Bottom] [Contents]

SaSetUseDefaultFlag

Tells client applications to use default values instead of the hard-coded values for server and database.

Synopsis

#include "WorkingDialog.h"
int SaSetUseDefaultFlag();

Arguments

None

Return Values

Returns -1 if called from within Sapphire/Web or 0 if in a server application executable (client).

Description

SaSetUseDefaultFlag is used only in clients generated by Sapphire/Web. It tells a client generated by Sapphire/Web to look for default values for the server and the database.

Default values are provided two ways and each must call SaSetUseDefaultFlag first. The two ways are:

1. Using SaSetDefaults(char *server, char *db) or by,
2. Using the DBUIMX_SERVER and DBUIMX_DB environment variables
When using the environment variables, both must be set before the client is invoked. If either one of the variables is not set, the default values will be ignored.

Once SaSetUseDefaultFlag is called, it cannot be undone.

Return Values Using UNIX Command-Line

...
#include "WorkingDialog.h"
...
int main(argc, argv)
	int argc; 
	char *argv[];
{...
/* command-line argument checking would occur here */
	SaSetUseDefaultFlag();
	SaSetDefaults(argv[1], argv[2]);
...}

Return Values (Using environment variables)

Unix C-Shell Command-Line:

% setenv DBUIMX_SERVER CEZANNE
% setenv DBUIMX_DB pubs2
Unix Bourne/Korn Shell Command-Line:

# DBUIMX_SERVER=CEZANNE
# DBUIMX_DB=pubs2
# export DBUIMX_SERVER DBUIMX_DB
...
#include "WorkingDialog.h"
...
int main()
{...
	SaSetUseDefaultFlag();
...}

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.