Unable to insert as non-owner of table

ako

Member
I have created a table under schema basysxe_owner.
I also created a public synonym for this table.

In my application I'm using a TOracleDataSet based on this table:
SELECT uit.*
, uit.ROWID
FROM bxe_uitgevers uit
ORDER
BY naam

When I'm running the application as the owner of the table (basysxe_owner) and I'm inserting a record in the table, everythings works well.
When I'm doing the same under another user (which has select, insert, update and delete privileges on that table) I'm receiving the ora-0942, table-or view does not exists error.

The way I'm inserting the row is as follows:
dmBASYSxe.dsUitgevers.Insert;
dmBASYSxe.dsUitgevers.FieldByName('NAAM').AsString := 'Korpershoek';
dmBASYSxe.dsUitgevers.FieldByName('WOONPLAATS').AsString := 'Oud-Beijerland';
dmBASYSxe.dsUitgevers.Post;

Does anyone has a clue what I'm doing wrong?
 
I'm not sure what is wrong, but if you enable TOracleDataSet.Debug and run this code, you can quickly verify which SQL statement is executed and why it leads to ORA-00942.
 
The problem is solved.
I am using a before-insert trigger which fetches the nextval from a sequence.
The proper grants on that sequence were missing.
 
Back
Top