JDBC and handling of errors

From: Kalle Dahlberg (kalle_at_newsgroups.nospam)
Date: 03/16/04


Date: Tue, 16 Mar 2004 00:36:06 -0800

Hi!

I'm working in a project which uses JDBC to connect to an SQL Server and execute some stored procedures. It works fine so far, excepting one thing: Some errors from SQL Server do not cause an SQLException to be thrown in the Java program. Most errors work fine, but some don't work.

For example, this query:
select 15/0
generates a divide by zero error in QA, but does not produce an exception in the Java program.

I'm using SQL Server 2000 sp 3a, and MS JDBC driver for SQL Server 2000 sp2.

I would be happy for any help/ideas you can give.

/Kalle Dahlberg



Relevant Pages

  • RE: Ignore SQL Server errors?
    ... As suggested, I have written a small SP to throw the Divide by Zero error, ... then select a string to display. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Checking if a cell entry is correct before adding it to anothe
    ... I've corrected this by inserting random data. ... > 1) I'm very confused about how you could have gotten a divide by zero error. ... > 2) You need to use the formula in only one cell, as it will sum all of the ...
    (microsoft.public.excel.worksheet.functions)
  • Re: passing value from 1 form to another form
    ... > I am using access forms to create an application using VBA. ... > the value in this filed to use a divide a sum on another subform. ... > but this brings up always the divide by zero error. ... 1)Public Variable Declaration ...
    (microsoft.public.access.modulesdaovba)
  • Re: DataColumn.Expression error handling
    ... Thus you might modify it a bit just to avoid an exception: ... classic division by zero error. ... being evaluated regardless of the condition. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: IOException thrown by process: avoidable?
    ... java program attempts to read the next line of output and gets ... the exception, and sometimes do not. ... dedicated threads to service the standard out, ... you can treat stdout and stderr separately, ...
    (comp.lang.java.programmer)