Re: Q: Nobody else can read my database - why? - more
Posted in 1996
> Kirstie Anna Fisher <kafisher@acs.ucalgary.ca> writes:
>
> Thanks for the replies - no luck so far however.
>
> The suggestions that I got were to set the DBPATH and run the command:
> grnat connect to public. No dice.
You may also need to grant select to username - se below.
> ANother suggestion was to look at the WHENEVER ERROR statement since it
> might be masking the treu problem. I don't use a WHENEVER ERROR statement
> when querying the data (THe 4gl program doesn't fail or die or anything -
> it just doesn't return any data) but ...
Forget about 4GL until dbaccess works.
> I went into dbaccess as root (_NOT_ the creator of the database) and I saw
> the database just fine. WHen I tried a simple query however, I got:
> root.user table not in database. SO, this leads me to believe that it is
> prepending the username to the table request and since the creator was
> knepperm, the table is actually called knepperm.user, it isn't finding it.
user is a very bad name for a table. There may be problems with table names
the same as reserved words in SQL. I allways prepend a fixed two letter
combination to every table name to make sure this doesn't ever happen.
> So, how do I look at the table? (I've tried querying on knepperm.user and
> it isn't found)
You should allways give the actual error message, including the number, you
receive. That might make it much easier to respond. What does "isn't found"
actually mean.
It sound however like you have created a mode ANSI database. That requires
you to allways prepend the user name (of the creator of the table) to the table
name. I think it's supposed to be in uppercase also?
You shouldn't ever create a mode ANSI database (unless you have some strange
government regulation that requires it). It can give you nothing but trouble.
(That isn't Informix's fault, but ANSI's!)
If your database is mode ANSI you also have to grant select/insert/update/delete
to every user before they can use it.
If it's not mode ANSI the default is that everything is granted to public so
everybody should be able to use any table as soon as it is created, and need
to give no user name. If you have revoked the select (or any other) priviledge
from public on a table you obviously have to grant it to whatever user that
needs access to this table.
Make sure you understand the difference between grant connect and grant select..
.. Other responces deleted ...
Nils.Myklebust@ccmail.telemax.no
NM-data, Aasesvei 71, 1300 Sandvika, Norway
My opinions are those of my company