1

I am new in developing Cobol programs in Linux environment.

My problem is that I create a table in PostgreSql and I am trying to connect to that table. The connection was sucessful and the sqlcode = 0. But, when I try to make a selection i receive the sqlcode = -0000000007 and the message:

SQLERRMC: ERROR: permission denied for relation minha;

Minha is my table. My connection string is:

01 dsn pic x(300) value "Driver={PostgreSQL}; - "Server=127.0.0.1;Port=5432;Database=orlandodb; - "Uid=postgres;"

Can anyone suggest how I can query the table?

2
  • Possible duplicate of ERROR: permission denied for relation tablename on Postgres while trying a SELECT as a readonly user. You need to GRANT read privileges (USAGE, SELECT, etc) to the table and schema. Commented Dec 30, 2016 at 16:28
  • thanks for the response, however my table was created with the postgres user and the schema is public. it is a simple test to see how it works. the select stament is:EXEC SQL SELECT cliente, numseq INTO :R-CODCLI-TCTIT, :R-NUMSEQ-TCTIT FROM minha WHERE cliente = '12345678' AND numseq = '000001' END-EXEC. Commented Dec 30, 2016 at 17:35

1 Answer 1

0

Check your credentials, does your user have access to the db and table?

You may do it in another application like PgAdmin or alike.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.