Print Thread
Unable to insert as non-owner of table
#8666 09/03/06 05:12 PM
Joined: Jan 2001
Posts: 2
Oud-beijerland, The Netherland...
A
ako Offline OP
Member
OP Offline
Member
A
Joined: Jan 2001
Posts: 2
Oud-beijerland, The Netherland...
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?

Re: Unable to insert as non-owner of table
#8667 09/05/06 11:04 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
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.


Marco Kalter
Allround Automations
Re: Unable to insert as non-owner of table
#8668 09/11/06 04:22 PM
Joined: Jan 2001
Posts: 2
Oud-beijerland, The Netherland...
A
ako Offline OP
Member
OP Offline
Member
A
Joined: Jan 2001
Posts: 2
Oud-beijerland, The Netherland...
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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 12 (0.008s) Memory: 2.5039 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-21 13:19:56 UTC
Valid HTML 5 and Valid CSS