A problem with StoredProc->Params.. AsString

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Lutz
Posts: 4
Joined: Thu 13 Oct 2005 12:41
Location: Germany

A problem with StoredProc->Params.. AsString

Post by Lutz » Wed 17 Jan 2007 09:51

Hi,

C++-Builder 6.0
ODAC 5.80 Built 38
Oracle 10g2

I have a Oracle-Procedur with a NUMBER Input-Parameter
as following (inside a package):

Code: Select all

    PROCEDURE addNumber(
        val  IN NUMBER)
    IS
    BEGIN

        DBMS_OUTPUT.put_line('=====> addNumber: insert Value as Number') ;
        DBMS_OUTPUT.put_line(' Value: '||val);

        INSERT INTO testtab (val)
        VALUES (addNumber.val);

    END addNumber;
where testtab is a table with ONLY a NUMBER-Field

When I use the Construct
OraStoredProc->Params->ParamByName(name)->AsString = val;
OR
OraStoredProc->Params->Items[0]->AsString = val;
AND val has more then 8 Digits

ODAC cuts val to 8 Digits,
that means at Oracle Procedure receives only the first 8 digits
(e.g. "1234567890" -> "12345678")

The use of
OraStoredProc1->Params->ParamValues[name] = val;
works, but there is a problem when val IS NULL, because I like to use the AsString - Property

Same problem in ODAC 5.70 Build 39.
With ODAC 5.70 Build 33 it works fine.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Thu 18 Jan 2007 07:59

We couldn't reproduce this situation. Please try to put OraSQLMonitor on your form, and use Core Lab DBMonitor or SQL Monitor to detect type and value of the parameter. Please send to ODAC support address complete sample that demonstrates this problem and including script to create server objects.

Post Reply