Page 1 of 1

ORA-01406 - Fetched column value was truncated

Posted: Thu 28 Apr 2005 10:53
by R. Santana
Hello,

I receive this error sometimes when I execute a procedure in a Package in Oracle 10g, the data returned has a CLOB field and some numbers and nvarchar2, could this be the problem? If I remove a field called title of type NVARCHAR2(255) the error dissapears.

Thanks.

Posted: Thu 28 Apr 2005 11:34
by Paul
Can you send us script for creatimg procedute? What is the OracleDbType of OraclePrameters do you use?

Posted: Thu 28 Apr 2005 12:25
by Guest
CREATE OR REPLACE PACKAGE mc_pk_get_mp_adm3_data_sec
AS
TYPE rcmp IS REF CURSOR;

PROCEDURE getphotosforadm3 (p_adm3 IN NUMBER, ds OUT rcmp);
END mc_pk_get_mp_adm3_data_sec;
/


CREATE OR REPLACE PACKAGE BODY Mc_Pk_Get_Mp_Adm3_Data_Sec
AS
PROCEDURE getphotosforadm3 (p_adm3 IN NUMBER, ds OUT rcmp)
IS
BEGIN
OPEN ds FOR
SELECT MC_MP.c_id,
MC_MP.d_title AS d_title,
MC_MP.f_dateon, MC_USERS.d_firstname,
MC_USERS.d_lastname, MC_USERS.d_email, ROWNUM
FROM MC_MP, MC_USERS
WHERE ( (MC_USERS.c_id(+) = MC_MP.c_usr_id)
AND (MC_MP.b_validated = 1)
AND (MC_MP.c_mic_id = 3)
AND (MC_MP.c_geo_id = p_adm3)
)
ORDER BY MC_MP.f_dateon DESC;
END;
END Mc_Pk_Get_Mp_Adm3_Data_Sec;
/

Posted: Thu 28 Apr 2005 13:45
by Paul
We cannot reproduce your problem using the following code. Send us please
small working demo project to demonstrate the problem
and include script to create server objects to OraDirect.Net support address.

Code: Select all

oracleConnection1.Open();
oracleCommand1.CommandText = "mc_pk_get_mp_adm3_data_sec.getphotosforadm3";
oracleCommand1.CommandType = CommandType.StoredProcedure;
oracleCommand1.CreateParameters();
oracleCommand1.ExecuteNonQuery();

Posted: Tue 03 May 2005 07:06
by R. Santana
I've been looking for help about this error, I only receive it when I'm using your component, if I execute the same query with any other component, or using ODBC for example it works perfectly.

I've seen that in your component the "Fetch Buffer Size" is gone, where is this property in your component?

Has your component any type of limit in the size of the rows retrieved from a query?

Regards.