This content has been marked as final. Show 17 replies
PLS-00201: identifier 'string' must be declared
Cause: You tried to reference either an undeclared variable, exception, procedure, or other item, or an item to which no privilege was granted or an item to which privilege was granted only through a role.
Action: 1) Check your spelling and declaration of the referenced name. 2) Verify that the declaration for the referenced item is placed correctly in the block structure. 3) If the referenced item is indeed declared but you don't have privileges to refer to that item, for security reasons, you will be notified only that the item is not declared. 4) If the referenced item is indeed declared and you believe that you have privileges to refer to that item, check the privileges; if the privileges were granted only via a role, then this is expected and documented behavior. Stored objects (packages, procedures, functions, triggers, views) run in the security domain of the object owner with no roles enabled except PUBLIC. Again, you will be notified only that the item was not declared.
It isn't the problem. The problem is when use tha package in VS2010, Oracle use NAME_PACKAGE#0#NAME_PROCEDURE and Oracle can use NAME_PACKAGE.NAME_PROCEDURE. It is a ploblem of the OOP.NET.
What happens when you call this stored procedure via SQL*Plus or SQL Developer? What about Oracle Developer Tools?
I ran the following ODP.NET code with what I assume is the same stored procedure name as you want to use. It executed successfully. Answering your question is hard without more details.
OracleConnection con = new OracleConnection("<Connection String>");
OracleCommand cmd = new OracleCommand("HR.CAMPO#0#TARJETAS_EMPLEADO", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter prm = new OracleParameter("param1", OracleDbType.Int16, 5);
prm.Direction = ParameterDirection.InputOutput;
prm.Value = 100;
Ok, I can now reproduce your issue. I was misunderstanding your setup. This is a known issue that has been reported before, but hasn't been fixed yet.
ORA-06550/PLS-00201 error while configuring data source
I did some more investigation. This appears to be a bug/enhancement request within Visual Studio itself. Visual Studio does not support the concept of packages. It considers the Package.Procedure format as all one name for a procedure. We've asked MS to support package names in future VS versions, but have not heard anything definitive yet.
Are there any news on this? We are having the same problem in VS2010.
We have many typed datasets (from package procedures) which have been created successfully with ODAC Release 3 Developer Tools. These datasets are used for report data sources.
Now when I updated to the latest ODAC I cannot add/modify datasets with the wizard.
No patch available yet.
There was a new release of ODAC (18.104.22.168.20) but according to my fast test this bug still exists. Right? I cannot find the bug with the ID you gave, is there a typo? When should we expect this to be fixed?
Is it really possible that ODAC 11.2 Release 4 does not support packages?
Is there a fix or work around yet?
Edited by: user3676889 on Nov 19, 2012 5:51 AM
Is there a fix or work around yet?
Visual Studio cannot parse stored procedures that use a Package.Procedure format. Microsoft must support this format in Visual Studio in order for Oracle Developer Tools to enable it. Oracle has communicated this bug/feature request to Microsoft, but have not been provided a time frame with a fix.
According to my tests version ODTwithODAC112021 was the last working version.
All newer versions are not working. It is not question of Visual Studio. Not Visual Studio was changed.
The question is: what and why was changed in ODT, which become unusable?