From: Daniel de Angelis Cordeiro Date: 2011-03-02T23:22:18+09:00 Subject: RubyODBC error codes when using prepared statements Hi, I'm using Ruby ODBC (with unixodbc and Postgresql). RubyODBC is loosing my error codes when running prepared statements. When I execute a faulty SQL command using ODBC::Database.run() or ODBC::Database.do() I get the following native error: 23505 (7) [unixODBC]ERROR: duplicate key value violates unique constraint "" However, when I execute the same SQL command using a prepared statement, I get the following internal error: INTERN (0) [RubyODBC]Stale ODBC::Statement Is there a way to recover the type of the native error when executing a prepared statement? Thanks in advance, Daniel