| Author |
bad returned parameters
|
|
|
| I've procedure/function with IN OUT VARCHAR2 parameter.
Procedure changes IN variable to shorter but OUT parameter remebers end
of IN string.
why? is it bug?
procedure test(p IN OUT VARCHAR2) is
begin
p:='12345xxxxx';
end test;
p:='54321'
test(p);
and p='54321xxxxx' :(
| |
| Hilarion 2005-08-31, 11:25 am |
| Jarek <jarek@NOSPAM.krak.pl> wrote:
> I've procedure/function with IN OUT VARCHAR2 parameter.
> Procedure changes IN variable to shorter but OUT parameter remebers end
> of IN string.
> why? is it bug?
>
>
> procedure test(p IN OUT VARCHAR2) is
> begin
> p:='12345xxxxx';
> end test;
>
>
> p:='54321'
> test(p);
>
> and p='54321xxxxx' :(
What is the full type of "p" variable passed to the procedure
(not the "p" parameter)? Where does it come from? How do you
declare / define it?
Hilarion
| |
|
| Variable is passed from VB application by RDO,
Value of variable is changed in pl/sql procedure.
RDO and odbc return bad value.
From VB: v='1234567890' is passed
PL/SQL changes v to 'abcd'
and VB gets:
v='abcd567890'
I really don't know why. Maybe it's ODBC or Rdo problem
Hilarion napisał(a):
> Jarek <jarek@NOSPAM.krak.pl> wrote:
>
>
>
>
> What is the full type of "p" variable passed to the procedure
> (not the "p" parameter)? Where does it come from? How do you
> declare / define it?
>
>
> Hilarion
| |
| Hilarion 2005-09-01, 7:25 am |
|
Jarek <jarek@NOSPAM.krak.pl> wrote:
Hilarion wrote:[color=darkred
]
Jarek <jarek@NOSPAM.krak.pl> wrote:[color=darkred
]
> Variable is passed from VB application by RDO,
> Value of variable is changed in pl/sql procedure.
> RDO and odbc return bad value.
>
> From VB: v='1234567890' is passed
>
> PL/SQL changes v to 'abcd'
>
> and VB gets:
>
> v='abcd567890'
>
> I really don't know why. Maybe it's ODBC or Rdo problem
Yes, that's probably it. To make sure check the behavior
of the procedure in SQLPlus using code like this:
var p varchar2(100);
begin
test( :p );
end;
/
print p;
If it works OK, then Oracle is not the one to blame.
I'm affraid I can't help you with ODBC/RDO.
Hilarion
|
|
|
|