cx_Oracle.NotSupportedError

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cpiyush
    New Member
    • Jan 2007
    • 31

    cx_Oracle.NotSupportedError

    Hi,

    I am using cx_Oracle Python-Oracle interface V4.2.
    Its a great tool.
    But I am facing one problem in using it.

    I Have given a create table command: -
    [HTML]CREATE TABLE JG_MESSAGE( ID NUMBER(12,0) NOT NULL ,SENDER VARCHAR2(32) NOT NULL ,CENTENTS VARCHAR2(4000) NOT NULL ,INTIME TIMESTAMP(6) NOT NULL ,HEADING VARCHAR2(255) DEFAULT NULL,THREADID NUMBER(12,0) DEFAULT 1,IP VARCHAR2(15) DEFAULT 'N/A', CONSTRAINT XP_JG_MESSAGE PRIMARY KEY(ID))[/HTML]

    Table is created successfully.

    Then I am giving "Select * from JG_MESSAGE", at this moment I am facing this error: -
    [HTML]cx_Oracle.NotSu pportedError: Variable_TypeBy OracleDataType: unhandled data type 187[/HTML]

    I think this is due to that constraint keyword in the create table query.

    Can You please tell me how to get rid from this problem, as I have been given this DB schema, & I can not chnage its definition, & also I don't want to switch from cx_Oracle to any other tool.

    Thanks & Regards
    cPiyush.
  • cpiyush
    New Member
    • Jan 2007
    • 31

    #2
    Hi got the actual problem in the above code, this is not because of that constraint clause, actually its because of that TIMESTAMP datatype of oracle. cx_Oracle's object is not supporting this type(I dunno why...), but it supports timestamp() function.

    Probably this type is not defined in the definition of cx_oracle module.

    Now can you please tell me how to resolve this problem in python??...mean s I want to get all the field types of above mentioned table definition, which includes timestamp also as a type.

    Let me explain my problem in a more simple way...
    I have created a cx_oracle connection object called 'connOb'.

    I have created a table with this definition:
    connOb.cursor.e xecute("CREATE TABLE SAMPLE(TS TIMESTAMP(6))")

    Now I want to execute this command: -
    connOb.cursor.e xecute("select * from sample").

    Then Its giving me error: -
    cx_Oracle.NotSu pportedError: Variable_TypeBy OracleDataType: unhandled data type 187

    So considering the above explained scenario can you plz tell me how can I do this??(Hope you have got the problem..)

    Thanks & Regards,
    cPiyush.

    Comment

    • cpiyush
      New Member
      • Jan 2007
      • 31

      #3
      Hi...

      Got the solution.

      I was using cx_Oracle 4.1.2 interface, which doesn't support TIMESTAMP data type.
      I replaced it with the latest version of cx_Oracle i.e. 4.3.1 & not its working.

      Hope no one else will do the same mistake againg.

      Regards,
      cPiyush.

      Comment

      Working...