Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect NVARCHAR2 object attribute information #45

Closed
kubo opened this Issue Nov 4, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@kubo
Copy link

kubo commented Nov 4, 2017

dpiObjectAttr_getInfo() returns incorrect dpiOracleTypeNum about NVARCHAR2 attributes.

I made a test program which gets attribute information about udt_ObjectDataTypes.
https://gist.github.com/kubo/17189baff057bb8fdd5797ae80750518
It printed:

STRINGCOL - 2001
UNICODECOL - 2001
FIXEDCHARCOL - 2003
FIXEDUNICODECOL - 2004
INTCOL - 2010
NUMBERCOL - 2010
DATECOL - 2011
TIMESTAMPCOL - 2012
TIMESTAMPTZCOL - 2013
TIMESTAMPLTZCOL - 2014
BINARYFLTCOL - 2007
BINARYDOUBLECOL - 2008

The datatype of UnicodeCol is nvarchar2(60). Its oracleTypeNum should be 2002(DPI_ORACLE_TYPE_NVARCHAR). However it is 2001(DPI_ORACLE_TYPE_VARCHAR).

@anthony-tuininga anthony-tuininga added the bug label Nov 4, 2017

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Nov 4, 2017

This was also discovered internally and a commit to correct this will be available shortly. :-)

anthony-tuininga added a commit that referenced this issue Nov 4, 2017

Object attributes use type DPI_SQLT_VCS instead of DPI_SQLT_CHR, so e…
…nsure that

type is also examined for the charset form (aka NVARCHAR2)
(#45).
@kubo

This comment has been minimized.

Copy link
Author

kubo commented Nov 4, 2017

Confirmed. Thanks!

@kubo kubo closed this Nov 4, 2017

anthony-tuininga added a commit that referenced this issue Nov 4, 2017

Object attributes use type DPI_SQLT_VCS instead of DPI_SQLT_CHR, so e…
…nsure that

type is also examined for the charset form (aka NVARCHAR2)
(#45).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.