connect_stringInserts userid and password into a connect string used to log on to a server. Syntaxstring connect_string(connect_string, userid, password) string connect_string, userid, password DescriptionThis function searches a generic connect string for %AUTH% , replaces it with the values for userid and password entered by user, and returns a connection string specific to the user. If userid and password are not used, then (%auth%) is omitted from cis.ini . In this case, connect_string() simply returns the original connect string Generic connect strings are assigned to environmental variables in the cis.ini file cisserver net:sql$database@1958:xxx.xxx.xx.xx(%AUTH%)!ljk ExampleYou can use connect_string() in the window trigger of a connection window that displays two data entry fields: userid and password
{
...
userid = NULL;
password= NULL;
while (true) { /* loop forever */
input(G.input_var);
if((userid && password)){
cursor_wait(true);
status("Connecting to AppServer/DbServer");
connect(0,connect_string(g.cisserver,userid,password));
status("Connected to AppServer/DbServer");
...
}
Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999 |