Solved

exec of stored procedure not working with Microsoft sqljdbc 2.0

Posted on 2009-07-14
5
362 Views
Last Modified: 2012-06-21
I am running an SQL Server stored procedure from a jsp program. It has been running fine with Microsoft sqljdbc driver version 1.1, but today I installed version 2.0. Now when I run the SP I get:

 DROPreport.jsp: 0, The statement did not return a result set.
exec dbo._DROPinterest_sp '546370',null

The last line above beginning "exec dbo. ..." is the query.

Any ideas?
0
Comment
Question by:jmarkfoley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:elimesika
ID: 24854217
HI

Yes, actually , this is a FEATURE added with the 1.2 release.

But, you can still get it working

See
http://blogs.msdn.com/jdbcteam/archive/2008/08/01/use-execute-and-getmoreresults-methods-for-those-pesky-complex-sql-queries.aspx
0
 
LVL 19

Expert Comment

by:elimesika
ID: 24854268
another solution I have seen suggested to call
SET NOCOUNT ON
if your SP does not return a result set

try it

Full post
http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/6bd281b0-c9d7-4987-80e7-2901b72daafe
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 24854748
elimesika - I checked out that link. You have got to be kidding me! Did someone have a contest to see how complex a jdbc query could be made? Hats off the to winner! That example is 70 lines of code instead of the less than 10 lines with the 1.1 Statement.executeQuery()

This stored procedure does return one result set, it is not empty and I do have SET NOCOUNT ON.

I have stored procedures all over this application. I can afford to go through and rewrite all my programs because of a driver change.

Is this the only possible reason this query isn't working? If so, I'll have to stick with version 1.1
0
 
LVL 19

Accepted Solution

by:
elimesika earned 500 total points
ID: 24887198
HI

Sorry to say that I don't know any other workaround for that, anyway, I am still working with the 1.1 driver in some of our applications , so, if you can stay with the 1.1 driver , its seems to me OK.
0
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 31603475
OK, I'll stick with 1.1 for now! It seems crazy for an driver upgrade to kill existing apps. Plus, it seems nonsensical in this case where the SP returns a simple result set. I can't imagine anyone cares if an SP "partially" works or some, but not all, of the component queries work. Either it works and returns the desired result set or the programmer has more work to do to fix the query!  But hey, that's just my opinion! Thanks.
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question