You can make an SQL call to a subroutine on a remote server.  You can set
the SQL Connect statement with a different user name and password.  Bind the
Parameters for the Subroutine and then Call it.  The code below may give you
some idea.

Regards

David Jordan


0019:       UID = USERNAME
0020:       PWD = PASSWORD
0021:       SOURCE = "FCSHOST"
0022:       PRINT "Connecting to Computer: ":
0023:       Fn = "SQLConnect"
...
0027:       STATUS = SQLSetConnectOption(CONENV, SQL.OS.UID, UID)
0028:       STATUS = SQLSetConnectOption(CONENV, SQL.OS.PWD, PWD)
0029:       PRINT "Connecting to data source: ": SOURCE
0030:       STATUS = SQLConnect(CONENV,SOURCE,PATHNAME,"")
....
0042:       Fn = "SQLBindParameter"
0043: *status = SQLBindParameter (statement.env, mrk#, data.type, sql.type,
prec, scale,param [,param.type])
0044:       STATUS =
SQLBindParameter(STMTENV,1,SQL.B.BASIC,SQL.CHAR,0,0,CLIENT.NO,SQL.PARAM.INPU
T)
0045:       GOSUB CKSTMTENV
......
0055:      STATUS = SQLExecute(STMTENV)
0056:        IF STATUS <> SQL.SUCCESS THEN RETURN 0

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, 26 January 2005 5:10 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Run phantom as another user

Anyone know how to run a Unidata subroutine as someone else? I cannot find
the article in u2ug.

Thanks

Graham
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to