Skip to Content.
Sympa Menu

freetds - JDBC: what kind of MSSQL errors are caught?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Michael Suedkamp" <ms AT suedkm.franken.de>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: JDBC: what kind of MSSQL errors are caught?
  • Date: Sat, 10 Nov 2001 10:29:31 -0500


Hi,

What kind of MS-SQL errors are caught as SQLExceptions by the FreeTDS JDBC
driver? If I have a wrong SQL statement e.g. having a not existing column
I get an SQLException. But if I e.g. try to insert a row where a unique
index constraint is violated nothing happens. I can check whether the row
was inserted or not by the result of executeUpdate() but I would like to
have the reason for it, i.e. the MS-SQL error.

BTW, the error message in the MS-SQL Query Analyzer is (sorry for German:
it reports the unique index constraint violation):

Server: Nachr.-Nr. 2601, Schweregrad 14, Status 3, Zeile 1
Zeile mit doppeltem Schlüssel kann in Objekt 'benutzer' mit eindeutigem
Index 'IX_benutzer' nicht eingefügt werden.
Die Anweisung wurde beendet.

Thanks for any help

Michael




Archive powered by MHonArc 2.6.24.

Top of Page