Hi ,
Any body can help me in storing XML document in oracle database as a data
but not as a just string.
thanks
madhu
Printable View
Hi ,
Any body can help me in storing XML document in oracle database as a data
but not as a just string.
thanks
madhu
Try storing it as a long datatype. I cache quite a bit of XML for a web application
in a long, and it works very well. I'm accessing Oracle with ADO, and you
can retrieve the long with a simple select statement. Oracle recommends
storing the data in a CLOB column, due to the fact that Oracle will phase
out the long datatype in future releases. Plus, CLOB's are more versatile
than longs. However, you can return a CLOB using a SQL statement with ADO.
You have to convert the CLOB to a Long, and return it as a return value/output
parameter from a stored function/procedure. Longs are much easier to work
with, however if you can get away with using CLOB's, then go with the CLOB
solution for future compatibility.
"Madhu" <mbalguri@worldbank.org> wrote:
>
>Hi ,
>
>Any body can help me in storing XML document in oracle database as a data
>but not as a just string.
>
>thanks
>madhu
Jay is right, a long data type is the way to go. But remember that if you
are using Microsoft's ODBC (or OLEDB) driver with Oracle 8.x the most you
can "insert" or "update" is 4k. (If you are using 7.x the limit is 2k)
If you need to store more than 4k then you have to use rsXML.addnew and/or
rsXML.update.
"Jay" <jay_broni@hotmail.com> wrote:
>
>Try storing it as a long datatype. I cache quite a bit of XML for a web
application
>in a long, and it works very well. I'm accessing Oracle with ADO, and you
>can retrieve the long with a simple select statement. Oracle recommends
>storing the data in a CLOB column, due to the fact that Oracle will phase
>out the long datatype in future releases. Plus, CLOB's are more versatile
>than longs. However, you can return a CLOB using a SQL statement with ADO.
> You have to convert the CLOB to a Long, and return it as a return value/output
>parameter from a stored function/procedure. Longs are much easier to work
>with, however if you can get away with using CLOB's, then go with the CLOB
>solution for future compatibility.
>
>"Madhu" <mbalguri@worldbank.org> wrote:
>>
>>Hi ,
>>
>>Any body can help me in storing XML document in oracle database as a data
>>but not as a just string.
>>
>>thanks
>>madhu
>
You really should read <a href="http://www.oreilly.com/catalog/orxmlapp/">Building
Oracle XML Applications</a> by Steve Muench. Are the xml-documents to be
inserted as such, or do you want to convert them to tables? Either way, this
book gives you all the answers you need.
good luck,
Marko.
"Rob" <collinsrs2000@yahoo.com> wrote:
>
>Jay is right, a long data type is the way to go. But remember that if you
>are using Microsoft's ODBC (or OLEDB) driver with Oracle 8.x the most you
>can "insert" or "update" is 4k. (If you are using 7.x the limit is 2k)
>If you need to store more than 4k then you have to use rsXML.addnew and/or
>rsXML.update.
>
>"Jay" <jay_broni@hotmail.com> wrote:
>>
>>Try storing it as a long datatype. I cache quite a bit of XML for a web
>application
>>in a long, and it works very well. I'm accessing Oracle with ADO, and
you
>>can retrieve the long with a simple select statement. Oracle recommends
>>storing the data in a CLOB column, due to the fact that Oracle will phase
>>out the long datatype in future releases. Plus, CLOB's are more versatile
>>than longs. However, you can return a CLOB using a SQL statement with
ADO.
>> You have to convert the CLOB to a Long, and return it as a return value/output
>>parameter from a stored function/procedure. Longs are much easier to work
>>with, however if you can get away with using CLOB's, then go with the CLOB
>>solution for future compatibility.
>>
>>"Madhu" <mbalguri@worldbank.org> wrote:
>>>
>>>Hi ,
>>>
>>>Any body can help me in storing XML document in oracle database as a data
>>>but not as a just string.
>>>
>>>thanks
>>>madhu
>>
>