can't open the tables

sahuri

New Member
Hi all,
I am newbie, i connect to progress DB via ODBC and it is success, but i can't open the tables. i try to access the table with SQL : 'select* from table_name' on SQL Explorer Tool and i get error message:access denied/authorisation failed.

I use Progress 9.1D on Windows XP SP 1 and connect to ODBC with Merant.

can you help me, please......
 
You shoud be upgrading to at least 9.1D09, well, while you at it, take it to 9.1E04, hmmm even better 10.1C :-)

To get to your question:
With SQL you need to give users permission to query the database. There are many KB articles on this.

Basically the follwing applies:

When the _User table is not empty SQL-92 users will get Driver Access Denied errors if the user is not in the _user table.

Fixes:
1. Add the sysprogress user to the _user table.
2. Connect to the database using sysprogress.
3. Grant permissions to the login names used by the users.
4. Remove the sysprogress user in the _User table.

HTH,

casper.
 
Here is some code i created to generate a .sql file to grant SELECT permission to all your tables in your database. Just replace the initial value of cUsrName to the user you want to give permissions to.


Code:
DEF VAR cLigne AS CHAR.
DEF VAR cUsrName AS CHAR INIT "test".

OUTPUT TO odbc.sql.
for each _file
  where (NOT _file._file-name BEGINS '_') 
  AND _file._owner = "PUB"  
  no-lock:

    cLigne = "grant select on pub." + _file._file-name + " to " + cUsrName + ";" .
    PUT UNFORMATTED cLigne SKIP.

end.
PUT UNFORMATTED "commit;" SKIP.

OUTPUT CLOSE.
 
Back
Top