RE: inserting XML Document into Oracle database using a stored procedure



I am a newbie in this, so not sure if I am asking the correct question?
If you guys need some specific information let me know.


The problem is I do not know what the problem is. I am not getting any
error message.

I expect the script to insert a xml document into the oracle database.

I have a stored procedure which is expecting a XmlType type parameter.

So in my perl script I create a XML::DOM object and then call the get
DocumentElement method which returns a DocumentElement which I bind with
the bind_param method. See code below.

my $infile = "designInfo.xml";
my $dom_parser = new XML::DOM::Parser;
my $doc = $dom_parser->parsefile($infile);

$func1->bind_param(":param1",$doc->getDocumentElement());

When I tried the above nothing happened.

$func1->bind_param(":param1",$doc->getDocumentElement(), { ora_type =>
ORA_CLOB });

When I tried the above line nothing happened

$func1->bind_param(":param1", "<test> foobar </test>", CLOB);

When I tried this I get the error wrong type being passed.


Thanks
Hari

-----Original Message-----
From: Alexander Foken [mailto:alexander@xxxxxxxx]
Sent: Thursday, March 02, 2006 2:33 AM
To: hariharan.venkata-chinnaswamy
Cc: dbi-users@xxxxxxxx
Subject: Re: inserting XML Document into Oracle database using a stored
procedure

Hariharan Venkata-Chinnaswamy wrote:

I am trying to insert a XMLType Xmldom.DOMDocument into the Oracle
database and I am stuck. Thanks in advance for any pointers.



Your post is like going to the doctor and just saying "I'm sick. Cure
me."

What exactly is your problem? What exactly do you expect your script to
do? What does it instead? What error messages are returned?

Alexander


--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/



.



Relevant Pages

  • Re: what does this cron error message mean?
    ... > I have set up a cron job which connects to the oracle database using SQL*Plus. ... > The error message is: ... you do as Hans-Joachim said and set cron's path in the script. ...
    (comp.unix.shell)
  • Re: Need a "retry" example with file()
    ... If I run the PHP page that contains ... > succeeds and I receive the XML document. ... > a retry loop with a 1 second wait value. ... > returns an error message. ...
    (alt.php)
  • RE: inserting XML Document into Oracle database using a stored procedure
    ... I expect the script to insert a xml document into the oracle database. ... You need to put error trapping in the code. ... You need to step through the code using the Perl debugger. ...
    (perl.dbi.users)
  • Re: Element content is incomplete (biztalk editor document validat
    ... can you open your xml document using Internet Explorer? ... >>i am trying to validate an xml document using the biztalk 2002 editor. ... >> i am not sure how to tell exactly what portion of the document is in error ... >> what are good techniques to debug this error message ...
    (microsoft.public.biztalk.general)
  • Re: Element content is incomplete (biztalk editor document validation)
    ... can you open your xml document using Internet Explorer? ... "A BizTalk Enthusiast" ... > i am not sure how to tell exactly what portion of the document is in error ... > what are good techniques to debug this error message ...
    (microsoft.public.biztalk.general)