Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security Works but Shortcut Does Not

Status
Not open for further replies.

eileen1309

Programmer
Dec 6, 2004
129
0
0
US
Ok Finally got user level security to work properly. Heres my plight. I created a shortcut which includes the full path to acces in quotes, the full path to the mdb file in quotes, /wrkgrp and then the workgroup file name in quotes. I know for fact it's not joining the workgroup for the session properly becuase i have on the main menu of my program the Currently Logged in User Name which is set to CurrentUser().

What am i doing wrong?

Any help would be great.
 
What does currentuser report?

Is it saying admin or something?

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
the current user returns #Name? yet when I physically join the workgroup and log in it will return the user that I logged in as
 
I'm guessing you have Admin priv's on the database and the other users don't?

This, as I have found in the past to my own cost, is a security issue. To programmatically modify the text in the Menu Bar to include the username (which I think is what you're trying to do, right?) you need Admin priv's on the database. If your users doesn't have these, you may encounter an error.

To reassure you, if the user is using a correctly set-up shortcut with the /wrkgrp parameter on it, they'll be using the right MDW. To check, you could always get them to log in, then you open the MDW's LDB file in Notepad and look for their username.

To get round this problem, I added an "About" option to my Help menu - this pops up a mesasge box with, amongst other things, the full path of the database and the current user name. This way, they can explicitly check which instance of the db they're in and who they're logged in as.

Hope this helps.



[pc2]
 
Open the application and run the following in the immediate window to determine the exact workgroup you are connected to. I use shortcuts for secured apps frequently and my experience has been that it is 99% not setting the correct workgroup in the shortcut. Is there a space in the path to the workgroup? If so then delimit the value with quotes. Does it prompt you for your login or have you placed it in the shortcut along with you username? Remove the username from the shortcut and, if it doesn't prompt you for a username you are not connected to it. You didn't use a blank password did you? The workgroup is not named with exactly the same name as the application is it? Using myapp.mdw with myapp.mdb doesn't work.

?syscmd(acSysCmdGetWorkgroupFile)
c:\dmats\ver1\system.mdw



---------------------
scking@arinc.com
---------------------
 
finally got it to work I removed the /User switch and everything seems to be fine now.

Thanks to everyone that responded.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top