Hi Dylan,

Cold Fusion 5.0  
call Oracle stored procedure ERROR
CFPROCPARAM tag error 

Error information 
Oracle Error Code = 6502 
ORA-06502: PL/SQL: numeric or value error ORA-06512: at "TAMIC.TEST50", 
line 8 ORA-06512: at line 1 
SQL = "TEST50" 
Data Source = "TA"


Error Occurred While Processing Request
Error Diagnostic InformationOracle Error Code = 6502 ORA-06502: 
PL/SQL: numeric or value error ORA-06512: at "TAMIC.TEST50", line 8 
ORA-06512: at line 1 SQL = "TEST50" Data Source = "TA" The error 
occurred while processing an element with a general identifier of 
(CFSTOREDPROC), occupying document position (106:1) to (106:67) in the 
template file E:\TFDEV\TBDS\MANIPULATION\ML_GETRELDEF.CFM.Date/Time: 
02/21/02 11:39:42Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows 
NT)Remote Address: 161.229.49.131Query String: 
FLDNAME=relref&relref=TB5TF20000071&refno= 


Reason: 
character value have to be pass less than 1 bytes than it's defined in 
Oracle stored procedure.
For example:
// Oracle stored procedure
CREATE OR REPLACE FUNCTION TEST50(P1 in CHAR, P2 in CHAR) return number
AS
WS_P1     CHAR(02);
WS_P2     CHAR(04);
BEGIN
   WS_P1  := P1;
   WS_P2  := P2;
END TEST50;
// Cold fusion 5.0 
<CFSTOREDPROC PROCEDURE="TEST50" DATASOURCE="#SESSION.DATASOURCE#">
     <CFPROCPARAM TYPE="IN"  CFSQLTYPE="CF_SQL_CHAR" 
DBVARNAME="P1"  VALUE="AB">
     <CFPROCPARAM TYPE="IN"  CFSQLTYPE="CF_SQL_CHAR" 
DBVARNAME="P2" VALUE="ABCD">
</CFSTOREDPROC> 

If define WS_P1 as char(02) within stored procedure TEST50 then can only 
pass 1 chars or less. Pass 2 chars or more will cause above error

Solution:
Change the CFSQLTYPE from CF_SQL_CHAR to CF_SQL_VARCHAR

    Thanks.

Riaz
  ----- Original Message ----- 
  From: Dylan Bromby 
  To: CF-Server 
  Sent: Thursday, February 21, 2002 1:13 AM
  Subject: Re: CFPROCPARAM tag oracle error 6502


  can you post the code between the cfstoredproc tags?

  dylan

  ----- Original Message -----
  From: "Riaz Sulaimi" <[EMAIL PROTECTED]>
  To: "CF-Server" <[EMAIL PROTECTED]>
  Sent: Wednesday, February 20, 2002 3:06 AM
  Subject: CFPROCPARAM tag oracle error 6502


  > Hiya all,
  >
  >     I recently upgraded our Coldfusion server from 4.5.1 sp1 to 5.0, 
but
  > encounter a problem after testing: our application fails in 5.0 
while it
  > was running fine under 4.5.1:
  >
  >     The tag CFPROCPARAM - when you pass CF_SQL_CHAR parameters to 
ORACLE
  > stored
  > procedure, hits an oracle error :
  >
  >     Oracle Error Code = 6502
  >     ORA-06502: PL/SQL: numeric or value error
  >
  >     Although this can be solved by changing CF_SQL_CHAR to
  > CF_SQL_VARCHAR, we can't afford to do so as it will involve a change 
to
  > the whole application.
  >
  >     Is there a workaround to this?
  >
  >     Thanks in advance :)
  >
  > Riaz
  >
  >
  > 
  
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to