Subject: | |
From: | |
Reply To: | |
Date: | Fri, 18 Dec 1998 15:15:06 +0530 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello,
Allbase/SQL handles authorizations differently for dynamic queries and
non-dynamic queries.
All queries given in ISQL are dynamic queries, and we can give both
dynamic and non-dynamic
queries from application programs and in your case you have given a
non-dynamic query in
your C program (i.e., the Select Statement).
Dynamic queries are executed if the login of the user has the authority
to execute the entered
command.
Non-Dynamic queries in the program are executed only if the original
owner of the module has
the authorization to execute the command at run time.
Hence in your case, your login had the authority to do a Select for the
Table,
but the owner of the Module of the C program did not have the
authorization to do a Select.
Hence to solve your problem you can issue a "grant for Select on the
table to the owner of the module"
For more information about authorizations and modules please refer the
"Allbase/SQL C Application Programming Guide " ( Chapter-1 :
authorizations, modules)
With Best Regards,
Kumaran.N.S.
Subject: Allbase: select authority
Date: Wed, 16 Dec 1998 08:09:32 -0500
From: Leonard Berkowitz <[log in to unmask]>
To: [log in to unmask]
Can someone explain this apparent anomaly and what to do about it?
An Allbase DBE attached to three TurboImage data bases resides on the HP3000. Access
to this DBE is from an HP9000. On the HP9000, the user can freely connect to the DBE
and execute queries (SELECT...) in ISQL. Now the user writes a C program to do the
same thing and comes up with an error, "User <user> does not have select authority to
<table>".
Why does the user have select authority in ISQL, but not in a local program written
and executed by that user in the same HP9000 session?
I solved the problem with a sledge-hammer: GRANT SELECT ON <table> TO PUBLIC, but
there must be a more elegant way. Yes, I can create a GRANT SELECT statement for
every table (dataset) in the DBE, and perhaps I can come up with a scheme to grant
this select to some realm that is not PUBLIC, but...
Any insights will be greatly appreciated.
========================
Leonard S. Berkowitz
mailto:[log in to unmask]
phone: (617) 972-9400 ext. 3250
fax: (617) 923-5555
|
|
|