Menu

Duplicate key error missing

Help
2011-12-07
2013-03-18
  • nenad cikic

    nenad cikic - 2011-12-07

    I have noticed that i do not have the error information when i add duplicate record. I used the template generated form, an i expected that it would tell me something about "duplicate error on key xyz". The xyz information is missing. I have put some logs and indeed the errorstatusgroup.Keyname is empty.
    Is this working for you?

    Thanks
    Nenad

     
  • Andrew Barnham

    Andrew Barnham - 2011-12-07

    Currently this does not work.  PostgreSQL does not reliably return this information.  You could potentially scrape Postgres error message queue, but messages may be localised; so would be difficult to deal with variations from installation to installation.

    If you want to experiment, the method of interest is setError() in ClarionSQLFile.  Note the line:
    if (state!=null && state.equals("23505")) error=40;

    Maybe try experimenting with output of fs.global.source.getConnection().getWarnings()

     

Log in to post a comment.

Auth0 Logo