Customer Portal

Long and Big Int with SQL Server DB Output Table

Comments 2

  • Avatar
    mike
    0
    Comment actions Permalink
    Hi,

    I have a graph which is doing a reformat and then at the end of it will be updating the database.

    The datafield of the Database table is a smallint as set in SQL Server.

    I am having problems getting the db output function to update this correctly.

    The only data types I can see that clover has are..

    Integer --> 2^31
    Numberic --> 2^1023
    Long --> 2^63
    Byte which is far too small giving a maximum of 127.

    I need one in the middle giving a value of 2^15 and cant see this.

    I am using Java code to parse this as a short but when it hits the edge it goes wrong and uses the data type the edge is set to. Which is understandable.

    My Java code is....

    Short x = (short)(counter);
    (outputRecords[1].getField(OUT0_memseqno)).setValue(x);


    The error message I get is...

    19:08:45,128 DEBUG [WatchDog] - Node DB_OUTPUT_TABLE0 error details:
    org.jetel.exception.JetelException: Incompatible Clover & JDBC field types - field memseqno Clover type: numeric caused by: java.sql.SQLException: Incompatible Clover & JDBC field types - field memseqno Clover type: numeric
    at org.jetel.component.DBOutputTable.execute(DBOutputTable.java:522)
    at org.jetel.graph.Node.run(Node.java:366)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Incompatible Clover & JDBC field types - field memseqno Clover type: numeric
    at org.jetel.connection.CopySQLData.jetel2sql(CopySQLData.java:162)
    at org.jetel.component.DBOutputTable.runInNormalMode(DBOutputTable.java:539)
    at org.jetel.component.DBOutputTable.execute(DBOutputTable.java:518)
    ... 2 more
    19:08:45,222 WARN [WatchDog] - Interrupted node: DATA_READER0

    I get this message for whatever data type I try.

    If I use byte this is not a big enough data type to handle what I will be passing or could be passing in the future.

    Any ideas please?

    I do have a work around which means running some code through Query Analyser / Enterprise Manager but this is not the way I would like to go as I would like to automate this.

    Thanks,

    Mike
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hi,
    I tried to copy smallint to SQL Server from Integer clover field and found no problem; it works properly.

Please sign in to leave a comment.