HOWTO: Obtain User Permissions from Oracle Server

ID: Q156666


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 6.0


SUMMARY

This article describes one method of determining what privileges a user has on an Oracle server.


MORE INFORMATION

The following code example demonstrates how to obtain user permissions from an Oracle server. Before attempting to run this code, be sure to replace the <datasource>, <user>, and <password> in the SQLStringConnect command with the appropriate values for your system.

Begin Code Example


   handle = SQLStringConnect("dsn=<datasource>;uid=<user>;pwd=<password>")
   status = SQLExec(handle, "Select * from SESSION_PRIVS", "SqlResult")
   IF (status < 1)
     ? "Unable to retrieve permissions"
   ELSE
     SCAN
       ? SqlResult.Privilege
     ENDSCAN
   ENDIF 

Additional query words:

Keywords : kbinterop kbDatabase kbVFp500 kbVFp600
Version :
Platform :
Issue type : kbhowto


Last Reviewed: August 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.