Dennis

The CVAL('netuser') will work, but keep in mind it is not necessarily the
persons network name, it is the name that the user uses to log into
windows. The name is a bit misleading here.. Granted almost every system
is going to be setup with the users Windows login name and the network
login name is going to be the same, but it could bite you...

You could use the SET VAR vg_user = (CVAL('NAME')) which would refer to
the name in the CFG file for the user, but this is a pain in #(*$&#$ as
well.

The CVAL netuser is the best option and then user something like

SET VAR vg_user = (CVAL('NETUSER'))
SET VAR vg_user = (STRIM(.vg_user))
SET VAR vg_user = (LUC(.vg_user))
IF vg_user = 'USERONE' OR vg_user = 'USERTWO' OR vg_user = 'USERTHREE' THEN
  SET VAR vg_user = 'DBOWNER'   *(This would be the name of the owner of the db
                                   or a user with the rights you want granted.)
  CONNECT db IDENTIFIED BY &vg_user

Jim Limburg

Dennis Fleming wrote:
A customer has a manufacturing app running all the time on the shop floor.
Each new user must log in when they start their shift, take breaks, etc.
They can jump out (and return) to our RBase app to enter a work request
when they see a problem. Where is a good place for the manufacturing app to
save the ident/password for us to pick up in RBase so we don't need to ask
"who are you" again? (I guess they could save it in a text file, but seems
a little clumsy).

TIA,

Dennis
***** Dennis Fleming
IISCO
http://www.TheBestCMMS.com
Phone: 570 775-7593
Fax: 570 775-9797






Reply via email to