[6.80.xxx] OUT VARCHAR2 issue, last char missing?!?

[6.80.xxx] OUT VARCHAR2 issue, last char missing?!?

Postby TheGramix » Mon 16 Apr 2012 06:56

Dear support,
I have a problem with the new version. I have functions like this one:

PROCEDURE GetStringResource( islocal IN VARCHAR2, classKeyOrVirtualPath IN VARCHAR2, resourceKey IN VARCHAR2, cLANGUAGE IN VARCHAR2, cVALUE OUT VARCHAR2 )
IS
cQuery VARCHAR2(4000);
BEGIN
IF( islocal = 'Y' ) THEN
cQuery := 'SELECT VALUE INTO :result FROM WEBSITE.RESOURCES_LOCAL WHERE VIRTUALPATH = :1 AND RESOURCEKEY = :2 AND LANGUAGE = :3';
ELSE
cQuery := 'SELECT VALUE INTO :result FROM WEBSITE.RESOURCES_GLOBAL WHERE CLASSKEY = :1 AND RESOURCEKEY = :2 AND LANGUAGE = :3';
END IF;
EXECUTE IMMEDIATE cQuery INTO cVALUE USING classKeyOrVirtualPath, resourceKey, cLANGUAGE;

EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
cVALUE := resourceKey;
cQuery := 'INSERT INTO WEBSITE.RESOURCES_MISSING( CK_OR_VP, RESOURCEKEY, LANGUAGE, ISLOCAL ) VALUES (:1, :2, :3, :4)';
EXECUTE IMMEDIATE cQuery USING classKeyOrVirtualPath, resourceKey, cLANGUAGE, islocal;
COMMIT;

EXCEPTION
WHEN OTHERS THEN
NULL;
END;

WHEN OTHERS THEN
NULL;

END GetResource;

where I extract the string resources from tables the last char is missing.
I call the function in this way:

OracleConnection ocn = new OracleConnection(ConfigurationManager.ConnectionStrings["WEBSITE"].ConnectionString);
ocn.Unicode = true;
OracleCommand ocmd = new OracleCommand("WEBSITE.PMNG_RESOURCES.GETSTRINGRESOURCE", ocn);
ocmd.CommandType = CommandType.StoredProcedure;

ocmd.Parameters.Add("ISLOCAL", (_isLocal ? "Y" : "N"));
ocmd.Parameters.Add("CLASSKEYORVIRTUALPATH", _classKeyOrVirtualPath);
ocmd.Parameters.Add("RESOURCEKEY", resourceKey);
ocmd.Parameters.Add("LANGUAGE", getCulture(culture));

// OracleParameter opRet = new OracleParameter("CVALUE", OracleDbType.VarChar, (int)Int16.MaxValue);
OracleParameter opRet = new OracleParameter("CVALUE", OracleDbType.VarChar, 4000);
opRet.Direction = ParameterDirection.Output;
ocmd.Parameters.Add(opRet);

ocn.Open();

try
{
ocmd.ExecuteNonQuery();
oRet = ocmd.Parameters["CVALUE"].Value;
if (oRet.ToString().Equals(String.Empty))
oRet = null;
}
catch{}

with previous versions 6.70.xxx everything was ok.
Could you help me?

Many thanks in advance
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14

Postby Pinturiccio » Thu 19 Apr 2012 12:41

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1997
Joined: Wed 02 Nov 2011 09:44

Postby TheGramix » Mon 23 Apr 2012 04:45

ok, thank you very much!
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14

Postby Pinturiccio » Tue 24 Apr 2012 13:14

We have fixed the bug with truncating the last character in values of VARCHAR output parameters. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1997
Joined: Wed 02 Nov 2011 09:44

Postby TheGramix » Wed 25 Apr 2012 04:49

perfect, thank you very much!
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14

Postby Pinturiccio » Fri 27 Apr 2012 05:10

The new build of dotConnect for Oracle 6.80.350 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23996
Pinturiccio
Devart Team
 
Posts: 1997
Joined: Wed 02 Nov 2011 09:44

Re: [6.80.xxx] OUT VARCHAR2 issue, last char missing?!?

Postby TheGramix » Thu 03 May 2012 07:06

Thank you very much!

I will try soon.
TheGramix
 
Posts: 8
Joined: Fri 14 Jan 2011 06:14


Return to dotConnect for Oracle