I am trying to make a login form through Oracle’s Form Builder, I have a table called TRAVEL_USER which I made in SQLPlus.
I have made a button and am using the trigger WHEN-BUTTON-PRESSED.
To start myself off I am using this code to simply count the number of users registered on the system:
DECLARE
TUsers NUMBER := 0;
BEGIN
SELECT COUNT(*) FROM TRAVEL_USER;
END;
When compiling this I get the following error:
Error 201: identifier ‘TRAVEL_USER’ must be declared.
I can confirm that this table exists in the database I am connecting to, I checked via SQLPlus and the data block wizard in the Oracle Forms Builder.
I connect to the database with full admin privileges (using the system username).
What user owns the TRAVEL_USER table? If you’re connecting as the user SYSTEM (Bad Idea) then you likely need to fully qualify the table name with the schema name that owns the table:
Either that or create a public synonym for the table:
You should not make a habit of using the SYS or SYSTEM accounts for application purposes. They are system accounts and should be used for system purposes.