[ 
https://issues.apache.org/jira/browse/TRAFODION-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liu ming resolved TRAFODION-2702.
---------------------------------
    Resolution: Fixed

> [ODBC] The SQL type is set to CHAR (n) CHARACTER SET USC2, SQLGetData to read 
> data multiple times returns the wrong length value
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2702
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2702
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-odbc-linux
>    Affects Versions: 2.2-incubating, 2.3-incubating
>         Environment: CentOS
>            Reporter: haolin.song
>             Fix For: 2.2-incubating, 2.3-incubating
>
>
>  The SQL type is set to 'CHAR (N)' CHARACTER SET USC2, SQLGetData will read 
> data multiple times when the length of buffer is less than the length of the 
> data but returns wrong size of length.
>         "CREATE TABLE TB_DEBUG(C1 CHAR(20)  CHARACTER SET UCS2)"
>       "INSERT INTO TB_DEBUG VALUES (_UCS2'0123456789abcdefghij')"
>       "select * from TB_DEBUG"
>          SQLFetch(hstmt);
>       while (retcode != SQL_NO_DATA_FOUND) 
>        ...
>               retcode = 
> SQLGetData(hstmt,(SWORD)(1),SQL_C_CHAR,UCS2Output,11,&len);
>        ...
> the SQLGetData will return 5 times and the len is 20,31,21,11,1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to