Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1675

[MTDCS] ODBC: SQLGetData run into error, invalid character value for cast specification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0-incubating
    • None
    • connectivity-dcs
    • None
    • platform: suse11
      connect info: 10.10.10.176:23400
      build: 20151121_0900-bin
      driver version: 1119

    Description

      with MTDCS on, SQLGetData API will run into error for data type SQL_C_DATE –

      comparing values SQL_WCHAR to SQL_C_DATE(9) after fetched
      06:55:49 ***ERROR: SQLGetData: Expected: SQL_SUCCESS Actual: SQL_ERROR
      File: ../../../../src/coast/coast_unified/src/getdata.c Line: 1859
      State: 22018
      Native Error: 0
      Error: [Trafodion ODBC Driver] INVALID CHARACTER VALUE FOR CAST SPECIFICATION. Row: 1 Column: 6

      Here is the test code it's running –

      CREATE TABLE SQLTODATE(C1 CHAR(10),C2 VARCHAR(10),C3 DATE,C4 TIMESTAMP,C5 LONG VARCHAR,C6 NCHAR(10),C7 NCHAR VARYING(10),C8 LONG VARCHAR CHARACTER SET UCS2) NO PARTITION;
      INSERT INTO SQLTODATE (C1,C2,C3,C4,C5,C6,C7,C8) VALUES ('1997-10-11','1999-01-01',

      {d '1993-12-30'}

      ,

      {ts '1992-12-31 00:00:00'}

      ,'1998-04-23',_UCS2'1997-10-11',_UCS2'1999-01-01',_UCS2'1998-04-23');
      SELECT * FROM SQLTODATE;
      SQLFetch(hstmt);
      SQLGetData(hstmt, (SWORD)(i+1),SQLDataValueTOC5[k].CType,&CDateOutput[i],0,&OutputLen2[i]);

      in above statement, column number is 6, and target type is SQL_C_DATE.

      Attachments

        Activity

          People

            ryzuo RuoYu Zuo
            rachelgao Gao, Rui-Xian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: