Can you do EXEC SQL GRANT .... in Pro*C?

From: <U08991_at_uicvm.uic.edu>
Date: Thursday, 9 Jul 1992 18:49:06 CDT
Message-ID: <92191.184906U08991_at_uicvm.uic.edu>


Hi fellow netters:

I am trying to give privileges to Oracle users in a C program.

In my C program, I connect to the database by executing an

EXEC SQL CONNECT :user IDENTIFIED BY :pwd;

where user,pwd have been filled with name and password of the owner of the tables in the database.
The program passes this point successfully. Then I want to execute the following:

EXEC SQL GRANT CONNECT TO :new_usr IDENTIFIED BY :his_pwd;

I have filled in the variables new_usr and his_pwd with the appropriate values - ( new_usr.arr = "newman", new_usr.len = 6 etc. )

When I execute the program, it goes to the label statement <no_fnd> which was declared at the beginning of the program as:

EXEC SQL WHENEVER NOT FOUND GOTO no_fnd;

Does anyone out there see any obvious error in my logic? Any help would be appreciated.

                                        Thanks,



                                                 Anil Ladalla
Received on Fri Jul 10 1992 - 01:49:06 CEST

Original text of this message