[Zope-DB] DataType is broken at all for Zope? (Was: Oracle Date in DCOracle2's Stored Procedure)

Bo M. Maryniuck b.maryniuk@forbis.lt
Mon, 20 Jan 2003 13:03:05 +0200


On Friday 17 January 2003 17:02, Matthew T. Kromer wrote:
> As such, you told Oracle to go figure out what the date "20030111" was,
> and it probably wanted "2003-01-11" or "11-01-2003" or "01-11-2003"
> depending on your date formatting settings.

No. On "20030220" I have this error:

=09ORA-01861: literal does not match format string

On anything else (nuts, working with it like a puzzle game) I always got:
=09
=09ORA-01843: not a valid month

I've made a little temporary tweak for DCOracle2.py (where your FIXME is =
on=20
1491 line) to know what exactly types Zope passes for a procedure. As I s=
ee,=20
there *is* OracleDate type passed, but still does not work. Here is a ful=
l=20
output:

BEGIN :1 :=3D  PM.PM_08.INSERT_DAY_REPORT(:2,:3,:4,:5,:6,:7,:8); END;=20
with parameters (__repr__):=20
[<BindingArray object at 0x952e108>, OracleDate("2003-02-10 00:00:00"), 8=
44L,=20
'Descr', 1, 10, 'Comment', <BindingArray object at 0x938aff8>]=20

args map:=20
["Val: <BindingArray object at 0x952e108>, Type: <type 'BindingArray'>}",=
=20
"Val: 2003-02-10 00:00:00, Type: <type 'OracleDate'>",=20
"Val: 844, Type: <type 'long int'>",=20
"Val: Descr, Type: <type 'string'>",=20
"Val: 1, Type: <type 'int'>",=20
"Val: 10, Type: <type 'int'>",=20
"Val: Comment, Type: <type 'string'>",=20
"Val: <BindingArray object at 0x938aff8>, Type: <type 'BindingArray'>"]

I think each type of each parameter is correct -- the last one is for err=
or.=20
But seems that OracleDateTime type in ZOracleDA is just broken for Zope a=
nd=20
that point is urgently bad for me... Matt, do you know where to find to f=
ix=20
it ASAP?

And other (bug?) is in Stored Procedure, that it requires IN/OUT paramete=
r to=20
pass. DCOracle2 documentation sais, that I should not pass parameters, wh=
ich=20
is OUT. But if I do not, I always got an Oracle exception: not enough=20
parameters. But this is not urgent: you can pass just en empty string.

--=20
Regards, Bogdan

"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!"
                             -- G.Romney