My comments in line ...
-----Original Message-----
From: Hariharan Venkata-Chinnaswamy
[mailto:[EMAIL PROTECTED]
Sent: Thursday, March 02, 2006 4:03 PM
To: Alexander Foken; hariharan.venkata-chinnaswamy
Cc: [email protected]
Subject: 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;
[rr] how do you know this worked? Where is the error trapping?
my $doc = $dom_parser->parsefile($infile);
[rr] Ditto from above comment.
$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.
[rr] Is the scalar "<test> foobar </test>" a Xmldom.DOMDocument type?
If not (and I'll bet it is not), this explains that error.
As I said in my earlier post:
1. You need to put error trapping in the code. No error trapping =
confusion - plain and simple.
2. You need to step through the code using the Perl debugger. Since
you are a newbie, read these docs:
Perl debugger:
http://www.ddj.com/documents/s=1498/ddj0108pl/
http://debugger.perl.org/
usenet posting guidelines (these specify the perl* groups, but they
should generally be applied to all positing):
http://www.issociate.de/board/goto/905650/Posting_Guidelines_for_comp.la
ng.perl.misc_($Revision:_1.5_$).html
If you don't understand what is wrong, how can anyone on this list
possibly understand either. Use error trapping with eval{} blocks.
Learn and become intimately close to the Perl debugger. Get acquainted
with http://metalink.oracle.com and http://tahiti.oracle.com. If, after
that, you still cannot figure this out and you need help with the
database aspects, post again with your specific issues including, but
not limited to, Oracle and Perl and module versions, and the Oracle
error you are encountering (ORA-nnnnnn), and almost anyone here will be
glad to help you.
rr
Thanks
Hari
-----Original Message-----
From: Alexander Foken [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 02, 2006 2:33 AM
To: hariharan.venkata-chinnaswamy
Cc: [email protected]
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:[EMAIL PROTECTED] http://www.foken.de/alexander/
This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is
intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.