Page 1 of 1

database procedure parameter truncated to one character

Posted: Wed 23 Jun 2010 04:49
by DuckyDuck
I am having a problem where string parameters that I pass to an Oracle database procedure (via an ODAC TOraStoredProc) are being
truncated to 1 character.

This problem only occurs when I use direct connect (OraSession.Options.Direct := TRUE)

Is there a workaround to this ?

I have reproduced this with a very simple test case, so I dont think this is a logic error in my app

Environment
Delphi 2009
Oracle 10gr2 XE database on my local PC

example code
====================

pass in value of "abcdef" to the parameter via the proc

the log table shows a value a "a" instead of "abcdef"

Delphi
~~~~~~~~~~~~~~~~~
OraStoredProc1.ParamByName('p_test_param').AsString := 'abcdef';
OraStoredProc1.ExecSQL;

Oracle Log Table
~~~~~~~~~~~~~~~~~
create table TESTX_LOG (
log_message varchar2(100)
);

Oracle Stored Procedure
~~~~~~~~~~~~~~~~~
create or replace procedure TESTX (p_test_param in varchar2) is
begin
insert into testx_log values ('p_test_param='|| p_test_param);
commit;
end;



thanks
Scott

Posted: Thu 24 Jun 2010 14:53
by bork
Hello

Unfortunately, we cannot reproduce your issue. Please provide us the following information:
- Exact ODAC version (for example 6.90.0.58)
- Charset of your Oracle server (result of the query: select * from sys.nls_database_parameters where parameter = 'NLS_CHARACTERSET')
- Charset that you set in the TOraSession.Options.Charset property
- The OraSession1.Options.UseUnicode property value

Posted: Mon 28 Jun 2010 14:48
by DuckyDuck
Thanks, but its ok now.

The problem does not occur after installing a more recent release 6.9.0.58 :D