Oracle8: registerOUTPatameter(..., REF,...) 
Author Message
 Oracle8: registerOUTPatameter(..., REF,...)
Hello,

Does anyone know what happens during

OracleCallableStatement.registerOutParameter (1, OracleTypes.REF,
"PERSON_T");

PERSON_T is an object type with attributes, refs and nested tables.

The above command causes the oracle jdbc driver to issue
28 statements. (Truely, ONLY THIS VERY SINGLE COMMAND!).

Is there anything I can do about it?

Thanks in advance

Albrecht

Sent via Deja.com http://www.***.com/
Share what you know. Learn what you don't.



Sun, 06 Jan 2002 03:00:00 GMT
 Oracle8: registerOUTPatameter(..., REF,...)

could you list the statements

Filip


Quote:
> Hello,

> Does anyone know what happens during

> OracleCallableStatement.registerOutParameter (1, OracleTypes.REF,
> "PERSON_T");

> PERSON_T is an object type with attributes, refs and nested tables.

> The above command causes the oracle jdbc driver to issue
> 28 statements. (Truely, ONLY THIS VERY SINGLE COMMAND!).

> Is there anything I can do about it?

> Thanks in advance

> Albrecht

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Sun, 06 Jan 2002 03:00:00 GMT
 Oracle8: registerOUTPatameter(..., REF,...)


Quote:
> could you list the statements

> Filip

Hi Filip,

Yes, of course:
(for the original posting I translated my schema names to English,
but I do not want to introduce bugs now, so just keep in mind
that Partei is German for Person (in this context))

        OracleCallableStatement cstmt =
(OracleCallableStatement)conn.prepareCall(
                        "declare partei_ref ref partei_t; " +
                        "begin insert into partei p (identifikationsnum)
values ('100') " +
                        "returning ref(p) into partei_ref; " +
                        "? := partei_ref; end;");

        System.out.println(" ** registerOUTParameter");
        cstmt.registerOutParameter (1, OracleTypes.REF, "PARTEI_T");
        System.out.println(" ** executeUpdate");
        cstmt.executeUpdate ();
        System.out.println(" ** executeUpdate finished");

I enabled JDBC tracing through

    DriverManager.setLogStream(System.out);

Between
 ** registerOUTParameter
 ** executeUpdate
I see 28 statements. This holds true, when I use a de{*filter*}, so it
cannot be an output sync problem.

My complete schema would use too much space, so here is just
Partei_t:

CREATE OR REPLACE TYPE Partei_t AS OBJECT (
        -- Attributs
        identifikationsnum VARCHAR(30),
        name VARCHAR(80),
        vipkennung CHAR(1),
        anredeEtikett REF Domaene_t,

        -- to 1 Refs
        dublette REF Partei_t,
        notiz REF Notiz_t,
        standardadresse REF Strassenadresse_t,
        standardadrgruppe REF Adressgruppe_t,

        -- nested tables
        bankverbindungen Bankverb_ntabtyp,
        adressgruppen Adrgrp_ntabtyp,
        rollen Rollen_ntabtyp,
        gruppen Gruppen_ntabtyp,

        -- Refs to supertype
        sub_Parteiengruppe REF Parteiengruppe_t,
        sub_NatPerson REF NatuerlichePerson_t,
        sub_Koerperschaft REF Koerperschaft_t
);

I created the following table:

CREATE TABLE Partei OF Partei_t
        NESTED TABLE bankverbindungen STORE AS Partei_bv_nt
        NESTED TABLE adressgruppen STORE AS Partei_adrgrp_nt
        NESTED TABLE rollen STORE AS Partei_rollen_nt
        NESTED TABLE gruppen STORE AS Partei_Parteigrp_nt;

Check also
http://www.***.com/

There I found a similar example.

If this was not specific enough, just ask.

Bye

Albrecht

Quote:



> > Hello,

> > Does anyone know what happens during

> > OracleCallableStatement.registerOutParameter (1, OracleTypes.REF,
> > "PERSON_T");

> > PERSON_T is an object type with attributes, refs and nested tables.

> > The above command causes the oracle jdbc driver to issue
> > 28 statements. (Truely, ONLY THIS VERY SINGLE COMMAND!).

> > Is there anything I can do about it?

> > Thanks in advance

> > Albrecht

> > Sent via Deja.com http://www.***.com/
> > Share what you know. Learn what you don't.

Sent via Deja.com http://www.***.com/
Share what you know. Learn what you don't.


Mon, 07 Jan 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Book: Oracle8 Complete Ref

2. Oracle8 The Complete Ref CD - Install on NT?

3. pgsql/doc/src/sgml/ref (pg_ctl-ref.sgml)

4. pgsql/doc/src/sgml/ref psql-ref.sgml

5. pgsql/doc/src/sgml/ref pgaccess-ref.sgml

6. pgsql/doc/src/sgml/ref (postgres-ref.sgml postmaster.sgml)

7. pgsql-server/doc/src/sgml/ref pg_ctl-ref.sgml

8. pgsql-server/doc/src/sgml/ref psql-ref.sgml

9. pgsql-server/doc/src/sgml/ref psql-ref.sgml

10. pgsql/doc/src/sgml/ref ecpg-ref.sgml

11. pgsql/doc/src/sgml/ref ecpg-ref.sgml

12. pgsql/doc/src/sgml/ref pg_ctl-ref.sgml


 
Powered by phpBB® Forum Software