How To Obtain User Permissions from Oracle Server

Last reviewed: January 20, 1997
Article ID: Q156666
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows 5.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


KBCategory: kbusage kbinterop kbhowto
KBSubcategory: FxinteropOdbc
Additional reference words: 5.00 kbdse vFoxWin



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.