NullPointerExceptions using CallableStatement



Hi,

I have come across the following problem using the SQLServer 2000 JDBC
drivers. We need to execute a stored proc on SQLServer, from within a
J2SE app (Java 1.4). We are using a CallableStatement to execute the
stored proc, however, unless we turn on implicit transactions within
the SQL of the stored procedure, when I call
CallableStatement.getResultSet, a null pointer exception is thrown. If
I refactor the code to use a Statement class, and simply execute an SQL
string as if I were executing the stored proc from query analyzer, it
works without requiring implicit transactions.

Any suggestions? The reason for not wanting to have implicit
transactions turned on if that MSDTC seems to be failing often, which
is a seperate problem we're looking at!!

.



Relevant Pages

  • executing sproc
    ... establish a new Connection Cnct and open it successfully. ... Before I run the stored proc, I execute a SQL Select ... Dim lcsConnectionString As String ...
    (microsoft.public.data.ado)
  • Re: Optimizer chooses different plans
    ... All our Employee data is from the mainframe, but the mileage_rate table has no mainframe dependency. ... Anyway, still doesn't answer why the code ALWAYS uses the indexes when cut and pasted to QA, but not so when the stored proc is executed. ... > Analyzer and execute it, ... >> After we added the hints it worked for a while but now does table scans. ...
    (microsoft.public.sqlserver.server)
  • Re: NullPointerExceptions using CallableStatement
    ... I have come across the following problem using the SQLServer 2000 JDBC ... We are using a CallableStatement to execute the ... stored proc, however, unless we turn on implicit transactions within ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: how to assign the contents of a field to a variable
    ... > Columnist, SQL Server Professional ... The second tries to find a STORED PROC ... as far as the code inside the EXECUTE() string is ...
    (microsoft.public.sqlserver.programming)
  • Ado and lock timeout error: is it a bug or its my fault?
    ... I'm experiencing a strange problem in Delphi 7 connecting to SqlServer ... using Ado components: ... At that point execute your program and, ...
    (borland.public.delphi.database.ado)

Loading