Assuming that FK table belongs to USERA, you need to do the following:

1. Login as USERB and create a synonym for FK table in USERB schema

CREATE SYNONYM {object_name} for USERA.{object_name}

2. Then login as USERA and Grant select, insert on FK_table to USERB. You need only select privileges on FK Table.

This way USERB has not only has access to the object but also has necessary privileges to select/insert data.

Another simpler way is to create PUBLIC synonyms for all the tables you are using in your application and grant all to public. Then you will not have a problem whatever the user you are logged in as.


[Edited by kris109 on 02-17-2002 at 10:59 AM]