plsql-table as parameter OCI-22303 Type "..".".." not found
Posted: Fri 26 Feb 2010 08:38
Hello,
I have a question concerning using plsql-tables in stored procedures as output-paremeters in my oracle packages
When executing with dotconnect 5.35.79.0 (non-direct mode) I got the message:
OCI-22303: type "user_test"."PCK_XXX.P_XXX_TABLE" not found
When executing with dotconnect 5.35.79.0 (direct mode) I got the message about unsupported network datatype (which I believe is indeed a remark on the direct-mode). So this is normal ?
When executing my stored procedure in Oracle SQL Developer, it's is working. So my procedure/package is OK.
Does anyone know what I do wrong, or why it is not working. Why do I get the type-not-found error (I'm connecting with the owner-account). Is there some example-code available which works with plsql-tables with multicolumns and as output-parameter.
PS: I got the same errors when trying to execute the procedure directly from with vs.net 2008 with OraDeveloperTools 2.55.148
Maybe some extra info
My oracle server is 10.2.0.4 64bit
My local client is version 8 --> this because we need acces also to older 7.3.4. Could the problem be solved with a oracle 10 client (which cannnot sdaly be installed next to oracle8 client)
Fred
This is my package code (simplified, and only relevant code, so not 100% complete)
PACKAGE user_test.PCK_XXX AS
TYPE P_XXX_TABLE IS TABLE OF user_test.XXX%ROWTYPE;
PROCEDURE SELECT_DETAILS (
p_Thickness OUT NUMBER,
p_ResultSet OUT user_test.PCK_XXX.P_XXX_TABLE
);
END PCK_XXX;
PACKAGE BODY user_test.PCK_XXX AS
PROCEDURE SELECT_DETAILS (
p_Thickness OUT NUMBER,
p_ResultSet OUT user_test.PCK_XXX.P_XXX_TABLE
)
AS
BEGIN
-- Normal PL-SQL code to create cursor: tmp_p_ResultSet
-- tmp_P_rec is record of rowtype of table to fetch
LOOP
FETCH tmp_p_ResultSet INTO tmp_P_rec;
EXIT WHEN tmp_p_ResultSet%NOTFOUND OR tmp_p_ResultSet%NOTFOUND IS NULL;
-- Add to table
tmp_Total := tmp_Total + 1;
p_ResultSet.EXTEND;
p_ResultSet(tmp_Total).FIELD1 := tmp_P_rec.FIELD1;
p_ResultSet(tmp_Total).FIELD2 := tmp_P_rec.FIELD2;
-- MORE different FIELDs
END LOOP;
CLOSE tmp_p_ResultSet;
END SELECT_DETAILS;
END PCK_XXX;
I have a question concerning using plsql-tables in stored procedures as output-paremeters in my oracle packages
When executing with dotconnect 5.35.79.0 (non-direct mode) I got the message:
OCI-22303: type "user_test"."PCK_XXX.P_XXX_TABLE" not found
When executing with dotconnect 5.35.79.0 (direct mode) I got the message about unsupported network datatype (which I believe is indeed a remark on the direct-mode). So this is normal ?
When executing my stored procedure in Oracle SQL Developer, it's is working. So my procedure/package is OK.
Does anyone know what I do wrong, or why it is not working. Why do I get the type-not-found error (I'm connecting with the owner-account). Is there some example-code available which works with plsql-tables with multicolumns and as output-parameter.
PS: I got the same errors when trying to execute the procedure directly from with vs.net 2008 with OraDeveloperTools 2.55.148
Maybe some extra info
My oracle server is 10.2.0.4 64bit
My local client is version 8 --> this because we need acces also to older 7.3.4. Could the problem be solved with a oracle 10 client (which cannnot sdaly be installed next to oracle8 client)
Fred
This is my package code (simplified, and only relevant code, so not 100% complete)
PACKAGE user_test.PCK_XXX AS
TYPE P_XXX_TABLE IS TABLE OF user_test.XXX%ROWTYPE;
PROCEDURE SELECT_DETAILS (
p_Thickness OUT NUMBER,
p_ResultSet OUT user_test.PCK_XXX.P_XXX_TABLE
);
END PCK_XXX;
PACKAGE BODY user_test.PCK_XXX AS
PROCEDURE SELECT_DETAILS (
p_Thickness OUT NUMBER,
p_ResultSet OUT user_test.PCK_XXX.P_XXX_TABLE
)
AS
BEGIN
-- Normal PL-SQL code to create cursor: tmp_p_ResultSet
-- tmp_P_rec is record of rowtype of table to fetch
LOOP
FETCH tmp_p_ResultSet INTO tmp_P_rec;
EXIT WHEN tmp_p_ResultSet%NOTFOUND OR tmp_p_ResultSet%NOTFOUND IS NULL;
-- Add to table
tmp_Total := tmp_Total + 1;
p_ResultSet.EXTEND;
p_ResultSet(tmp_Total).FIELD1 := tmp_P_rec.FIELD1;
p_ResultSet(tmp_Total).FIELD2 := tmp_P_rec.FIELD2;
-- MORE different FIELDs
END LOOP;
CLOSE tmp_p_ResultSet;
END SELECT_DETAILS;
END PCK_XXX;