[Prev] [Next] [Top] [Bottom] [Contents] (136 out of 193)

SaSetDefaultPass

Sets the password that a Sapphire/Web-generated cgi executable will use when logging into a database server.

Synopsis

#include "WorkingDialog.h"

int SaSetDefaultPass(char* pass);

Arguments

pass
Password to use for login to the database server by the Sapphire/Web-generated cgi.

Return Values

Returns 0.

Description

Sets the password that a Sapphire/Web-generated cgi executable will use when logging into a database server. The default value can be set multiple times during the execution of a cgi. However, the new value will have no effect for any database server that already has a valid login. Usually, you would only use a hard-coded value for a restricted user and that user's password in this function call.

If the operation requires the remote user's identity, use a Form with an Input Element for user name and a password element for the password. Use the Password Input Value as the argument to this call. This value is also used if embedded SQL is allowed (referenced in See Also). It is highly recommended that the default user for this path through the cgi be a restricted user when allowing embedded SQL.

Recommended format:
SaSetDefaultPass("guestpass"); 
The following embedded SQL could potentially be dangerous if the default user had delete privileges.

Not recommended:
##Sa_SQL=delete from authors## 
Note: This call is generated automatically by Sapphire/Web in the cgi Main C file, with the dirname being the value of the Database User Password project option.

See Also


[Prev] [Next] [Top] [Bottom] [Contents] (136 out of 193)