SQn missing argument error

Help
jherranzm
2014-03-20
2014-03-21
  • jherranzm
    jherranzm
    2014-03-20

    Hi everyone,

    trying to read a table from a database,

            for (Row rs : table) {
    
                String ret = (String) rs.get("Cliente");
    

    ...

            }
    

    it works perfectly fine until it reaches a certain (always the same) register. When I look into the table with Access and search the register it happens to have some whitespaces at the end of the field that gives this error.

    Is it possible to trim somehow these whitespaces

    I post the debug message

    DEBUG 2014-03-20 10:44:49,759 [main][Debug.java:127] : expand output:
    DEBUG 2014-03-20 10:44:49,759 [main][Debug.java:73] : TELEMARKETING
    DEBUG 2014-03-20 10:44:49,759 [main][Debug.java:127] : expand output:
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:73] : GERENCIA VENTAS CANAL TELEFONICO PE
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:127] : expand output:
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:73] : 36406914
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:127] : expand output:
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:73] : A78404639
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:103] : SQn:0
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:148] : SQn missing argument: (15):
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:89] : 1,
    DEBUG 2014-03-20 10:44:49,760 [main][Debug.java:103] : Length ==16 iCur =15

     
  • James Ahlborn
    James Ahlborn
    2014-03-21

    I can't say that i completely understand your question. you're saying that one of the values in the database has whitespace on the end? is jackcess encountering an error reading it, or is your program is having a problem because it doesn't expect whitespace at the end of the value?