Trapping for NO EXECUTE permissions on SP

Trapping for NO EXECUTE permissions on SP

Post by Reid Kel » Sat, 10 Nov 2001 05:24:31



I have a Data Project with some forms whos recordsource is based on a stored
procedure. I cannot figure out how to error trap for the situation where the
user does not have Execute permissions. I've tried trapping on the form's
OnError event with no luck. Any help is appreciated.

--
Reid Kell
Lockheed-Martin

 
 
 

Trapping for NO EXECUTE permissions on SP

Post by Uwe Ricke » Sat, 10 Nov 2001 12:37:13


Hi Reid,

before you should fire the stored procedure fire a
"SELECT PERMISSIONS('mySP')" against the server and
check the result.

See more about PERMISSIONS in BOL

HTH :-)

--
Gru?, Uwe Ricken
MCP FOR MS ACCESS DEVELOPMENT
GNS GmbH, Frankfurt am Main
http://www.gns-online.de
____________________________________________________
APP:    http://www.AccessProfiPool.com
FAQ:   http://www.donkarl.com/AccessFAQ.htm

 
 
 

Trapping for NO EXECUTE permissions on SP

Post by Andrew Cha » Tue, 20 Nov 2001 01:39:33


Reid -

In the OnOpen event, set the RecordSource run a function to test if the user
has permissions (just open and close an ADO recordset with the stored
procedure and trap for any errors).  If the user has no permission you can
set the OnOpen event's Cancel parameter to 1 to cancel opening the form (and
exit gracefully without the error message).

- Andrew.