Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> xmltype as parameter to stored procedure

xmltype as parameter to stored procedure

From: Alex <azp74_at_hotmail.com>
Date: 16 Nov 2004 04:46:57 -0800
Message-ID: <dca1064b.0411160446.4e2daaf@posting.google.com>


Hi

I'm running Oracle 9i 9.2.0.1.0 on Windows, using the OCI.

I have a stored procedure which takes, amongst other things an xmltype (may be null). Previously, I was passing the value as an SQLT_STR and everything was OK but I have to support strings longer than 4K.

From what I have read both here and on the Oracle forums site I definitely need to use a placeholder and I wil have to use a lob locator so I have changed my call to be:

call additem( ... , :md, ...);

Then ...

        prepare()
        OCIDescriptorAlloc()
        OCILobCreateTemporary()
        OCIBindByPos()
        execute()
        OCILobWrite()

My call to OCILobWrite results in a wrong number of types/arguments error.

If I can my sql to be:
  call additem( ... , xmltype(:md), ...) then I get an input source is empty error (LPX-00229).

Although I've successfully used lob locators for extracting information from a database calling a stored procedure seems to be a completely different ball game!

I'm not 100% sure which syntax I should be using for my sql statement and I'm not confident that I'm using the correct OCI calls in the correct order.

Any help greatly appreciated ...
TIA
Alex Received on Tue Nov 16 2004 - 06:46:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US