Hey everyone - this has been driving me nuts all day yesterday and so far this 
morning.

I have 2 stored procs for dealing with a table, one to insert data, and one to update 
the data.  The procs are called from ColdFusion MX.
(Oracle is 8i, for those that care)

Code is at the bottom of the email (so as to not clutter)

When inserting the 'data' using a the t_value = "", everything works fine.

When updating the value using a string of 350 characters long for t_value, the 
update sproc works fine.

When inserting the data with t_value being the same 350 character long string, it 
throws a:
ORA-01460: unimplemented or unreasonable conversion requested 

can anyone suggest anything?

I'm totally stuck :oP

Thanks,

Mark

-------- calling insert sproc:-----------
<cfstoredproc procedure="Request.insertData" datasource="#this.datasource#" 
 debug="No">
  
  <cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC"    
    dbvarname="t_lnkRequestID" value="#this.lnkRequestID#" null="No">

  <cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC" 
   dbvarname="t_lnkElementID" value="#this.lnkElementID#" null="No">

  <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="t_value" 
   value="#this.value#" null="No">

  <cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC"   
   dbvarname="t_isChanged" 
   value="#IIF(this.isChanged, DE("1"), DE("0"))#" null="No">

<cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC" 
  dbvarname="t_versionNumber" value="#this.versionNumber#" null="No">
		
  <cfprocparam type="Out" cfsqltype="CF_SQL_NUMERIC" variable="ID" 
    null="No">
</cfstoredproc>
-------- insert sproc:-----------
FUNCTION insertData (					
		  t_lnkrequestid IN NUMBER,			
		  t_lnkelementid IN NUMBER,			
	                  t_value IN VARCHAR2,			
		  t_ischanged IN NUMBER,			
		  t_versionnumber IN NUMBER		 	
	               ) RETURN NUMBER IS
BEGIN
	 DECLARE
	CURSOR c_ID IS
	   SELECT req_data_seq.CURRVAL
	   FROM DUAL;

	   t_retVal NUMBER;
	 BEGIN
			INSERT INTO TBL_REQ_DATA
			( iddata,
			  lnkrequestid,
			  lnkelementid,
			  data_value,
			  data_ischanged,
			  data_versionnumber )
			VALUES
			( req_data_seq.NEXTVAL,
			  t_lnkrequestid,
			  t_lnkelementid,
			  t_value,
			  t_ischanged,
			  t_versionnumber );

		   OPEN c_ID;
		   FETCH c_ID INTO t_retVal;
		   CLOSE c_ID;

		   RETURN t_retVal;
	 END;
END insertData;

-------- calling update sproc:-----------
<cfstoredproc procedure="Request.updateData" datasource="#this.datasource#">
  <cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC" 
    dbvarname="t_IDElement" value="#this.id#" null="No">
  <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="t_value" 
    value="#this.value#" null="No">
</cfstoredproc>	
-------- update sproc:-----------
PROCEDURE updateData (		  			  
		  t_IDData IN NUMBER,
		  t_Value IN VARCHAR2
		  ) IS
BEGIN

	 UPDATE TBL_REQ_DATA
 	 SET
	 	data_value = t_value
	 WHERE
	  	IDData = t_IDData;
END updateData;

-----------------------------------
mark@safefrombees.com       
ICQ: 3094740
Safe From Bees
[www.safefrombees.com]
