Illegal datatype equivalencing operation using Pro C compiler

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John Randall
    New Member
    • Jul 2007
    • 3

    Illegal datatype equivalencing operation using Pro C compiler

    When I try to do datatype equivancing for a date in a .pc file, and then use the precompiler.

    typedef char TMK_date[7];
    EXEC SQL VAR TMK_date IS DATE;

    I get following message
    Semantic error at line 383, column 4, file embedsql.pc:
    EXEC SQL VAR TMK_date IS DATE;
    ...1
    PCC-S-02351, illegal datatype equivalencing operation

    Can anyone tell me or point to code to show how to properly do datatype equivalencing using a date? Thanks in advance.
  • draji
    New Member
    • Jul 2007
    • 3

    #2
    So the field is of DATE type?

    As I recall..
    Try something like
    EXEC SQL BEGIN DECLARE SECTION;

    v_data VARCHAR2[11];
    ............... ............... .........
    EXEC SQL END DECLARE SECTION;

    Anyway , you must consider the format of your data variable. For instance you can declare it as int and convert your data field to number in select statement... So, are many cases to think about and also solutions to find..

    Comment

    Working...