views:

393

answers:

1

Hi,

I have an oracle table with a column from type "SYS.XMLTYPE" and a storage procudure which is doing the insert:

(Short version):

PROCEDURE InsertXML 
(
     pXMLData IN LONG 
)
IS
BEGIN

    INSERT INTO MY_TABLE (XML_DATA) VALUES(pXMLData);

END InsertXML;

I call this sp from my C# code with type "OracleType.LongVarChar".

Now the problem: If the xml has less than 4000 characters everything is working fine, but by using a xml with more than 4000 characters I get the following error:

ORA-20000: ORA-01461: can bind a LONG value only for insert into a LONG column

How can I handle this? Thx 4 answers

+1  A: 

Check the Oracle docs about XMLType

Also, I believe the datatype should be a CLOB (Character Large Object).

Dan
Thx, "CLOB" type was the answer :)/closed
Marco
@Marco - you have acknowledged that this answer is correct, so please accept it.
APC