This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a CLOB datatype in an Oracle database that is throwing the above exception when trying to update a record with that column set to a string 7,983 character in length (converting to byte array: im.IncidentDescription = incident.Description != null ? System.Text.Encoding.Default.GetBytes(incident.Description) : null; ). I'm using the Oracle9 provider. Here is the DDL for my table. The column with the issue is "INCIDENT_DESCRIPTION." I suspect I would have similar results with the other CLOB types. Please help? CREATE TABLE "GXPMD"."INCIDENT" ( "INCIDENTID" VARCHAR2(9 BYTE), "INCIDENTSTATUS" VARCHAR2(48 BYTE), "INCIDENTALERTSTATUS" VARCHAR2(48 BYTE), "INCIDENTASSIGNMENTSTATUS" VARCHAR2(48 BYTE), "INCIDENTASSIGNMENTGROUP" VARCHAR2(48 BYTE), "INCIDENTASSIGNMENTGROUPDESCRI" VARCHAR2(256 BYTE), "INCIDENTASSIGNEE" VARCHAR2(8 BYTE), "INCIDENTTICKETTYPE" VARCHAR2(48 BYTE), "INCIDENTAREA" VARCHAR2(48 BYTE), "INCIDENTSUBAREA" VARCHAR2(48 BYTE), "INCIDENTCAUSE" VARCHAR2(1024 BYTE), "INCIDENTIMPACTSTRING" VARCHAR2(128 BYTE), "INCIDENTIMPACT" NUMBER(16,0), "INCIDENTURGENCYSTRING" VARCHAR2(128 BYTE), "INCIDENTURGENCY" NUMBER(16,0), "INCIDENTPRIORITYSTRING" VARCHAR2(128 BYTE), "INCIDENTPRIORITY" NUMBER(16,0), "INCIDENTAFFECTEDSERVICE" VARCHAR2(128 BYTE), "INCIDENTAFFECTEDCI" VARCHAR2(48 BYTE), "INCIDENTCIDESCRIPTION" VARCHAR2(128 BYTE), "INCIDENTEVENTSTART" TIMESTAMP (6), "INCIDENTEVENTEND" TIMESTAMP (6), "INCIDENTBRIEFDESCRIPTION" VARCHAR2(512 BYTE), "INCIDENTDESCRIPTION" CLOB, "INCIDENTCLOSURECODE" VARCHAR2(48 BYTE), "INCIDENTTACKINGCODE" VARCHAR2(48 BYTE), "INCIDENTSOLUTION" CLOB, "INCIDENTMASTERINCIDENT" CHAR(1 BYTE) DEFAULT 'N', "INCIDENTCHILDINCIDENT" CHAR(1 BYTE) DEFAULT 'N', "INCIDENTTRACKINGCODE" VARCHAR2(48 BYTE), "INCIDENTJOURNALUPDATES" CLOB ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFERPOOL DEFAULT FLASHCACHE DEFAULT CELLFLASHCACHE DEFAULT) TABLESPACE "SYSTEM" LOB ("INCIDENTDESCRIPTION") STORE AS BASICFILE ( TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION NOCACHE LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFERPOOL DEFAULT FLASHCACHE DEFAULT CELLFLASHCACHE DEFAULT)) LOB ("INCIDENTSOLUTION") STORE AS BASICFILE ( TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION NOCACHE LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFERPOOL DEFAULT FLASHCACHE DEFAULT CELLFLASHCACHE DEFAULT)) LOB ("INCIDENTJOURNALUPDATES") STORE AS BASICFILE ( TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION NOCACHE LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFERPOOL DEFAULT FLASHCACHE DEFAULT CELLFLASHCACHE DEFAULT)) ; |
|
|
I suspect the problem may come from the way in which the data types are being mapped into ADO.NET and then by the Oracle ADO.NET provider. We map a byte array to DbType.Binary, it looks like this is then mapped to OracleDbType.Raw by inference which maps to the RAW data type. CLOB seems to be inferred from using Object so perhaps you could expose the property as Object and assign it the byte array and check how this is handled.
|
|
|
That seems to have done the trick. Thank you! |
|