Skip to content

OCI-22060: dpiObject_getAttributeValue for PLS_INTEGER #112

@tgulacsi

Description

@tgulacsi

I'm calling

C.dpiObject_getAttributeValue(O.dpiObject, attr.dpiObjectAttr, data.NativeTypeNum, data.dpiData) 

for

TYPE rec_typ IS RECORD (int PLS_INTEGER, num NUMBER, vc VARCHAR2(1000), c CHAR(1000), dt DATE);

's "INT" attribute,

with

obj_test.go:141: getAttributeValue("INT", obj=BRUNO_OWNER.REC_TYP, attr=&{typeDef:0x898c40 checkInt:3933035998 refCount:1 env:0x1eaddb0 belongsToType:0x1f1c2c0 name:0x1f05a60 nameLength:3 typeInfo:{oracleTypeNum:2009 defaultNativeTypeNum:3000 ociTypeCode:266 dbSizeInBytes:0 clientSizeInBytes:0 sizeInChars:0 precision:0 scale:0 fsPrecision:0 objectType:<nil>}}, typ=3000):

and get

ORA-22060: OCI-22060: argument [2] is an invalid or uninitialized number INT

debug log:

ODPI [32483] 2019-08-17 07:49:09.515: fn start dpiObject_getAttributeValue(0x1f8c850)
ODPI [32483] 2019-08-17 07:49:09.531: OCI error OCI-22060: argument [2] is an invalid or uninitialized number (dpiObject_getAttributeValue / number to integer)

What am I doing wrong?

The documentation of getAttributeValue says only NUMBER types need a destination buffer, all other types are managed.

This sort-of works (returns nil instead of error) when I replace PLS_INTEGER with INTEGER.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpatch availableAwaiting inclusion in official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions