Connecting Tech Pros Worldwide Help | Site Map

Oracle ocinewcollection and collection defined inside package

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 02:28 AM
Tomislav Petrovic
Guest
 
Posts: n/a
Default Oracle ocinewcollection and collection defined inside package

In Oracle I have:
CREATE OR REPLACE TYPE "NUMBER_TBL" AS TABLE OF NUMBER(11);
when I do in PHP:
$arr = ocinewcollection($db, 'NUMBER_TBL');
everything is fine and I get collection object...

on the other hand if I have in Oracle:
CREATE OR REPLACE PACKAGE "TRIAL" AS
TYPE VARCHAR2_TBL IS TABLE OF VARCHAR2(11);
END;
when I do in PHP:
$arr = ocinewcollection($db, 'VARCHAR2_TBL');
I get false with a warning:
Warning: ocinewcollection(): OCITypeByName: OCI-22303: type
"."."VARCHAR2_TBL" not found in d:\tomy\htdocs\info2.php on line 16

What should I do so the second example with collection inside package works?

Thank you, Tomy.



  #2  
Old July 17th, 2005, 02:35 AM
Andy Hassall
Guest
 
Posts: n/a
Default Re: Oracle ocinewcollection and collection defined inside package

On Fri, 16 Jan 2004 18:07:30 +0100, "Tomislav Petrovic" <t.petrovic@inet.hr>
wrote:
[color=blue]
>In Oracle I have:
>CREATE OR REPLACE TYPE "NUMBER_TBL" AS TABLE OF NUMBER(11);
>when I do in PHP:
> $arr = ocinewcollection($db, 'NUMBER_TBL');
>everything is fine and I get collection object...
>
>on the other hand if I have in Oracle:
>CREATE OR REPLACE PACKAGE "TRIAL" AS
> TYPE VARCHAR2_TBL IS TABLE OF VARCHAR2(11);
>END;
>when I do in PHP:
> $arr = ocinewcollection($db, 'VARCHAR2_TBL');
>I get false with a warning:
>Warning: ocinewcollection(): OCITypeByName: OCI-22303: type
>"."."VARCHAR2_TBL" not found in d:\tomy\htdocs\info2.php on line 16
>
>What should I do so the second example with collection inside package works?[/color]

Presumably qualify the name, i.e. TRIAL.VARCHAR2_TBL.

--
Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.