File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes No ResultSet set was produced Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No ResultSet set was produced" Watch "No ResultSet set was produced" New topic
Author

No ResultSet set was produced

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Hi,

what can cause this exception : "java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]No ResultSet set was produced."


thanks


Thanks,
Sherif
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

My guess is you are trying to call executeQuery with some SQL that doesn't produce a result set. Can we see your code?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

here is my Code :


Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

So you are running an update statement? This won't produce a resutls set. Try using execute instead.
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Originally posted by Paul Sturrock:
So you are running an update statement? This won't produce a resutls set. Try using execute instead.


in this part



i cant use execute because it returns boolean, what do you think?
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Any suggestions ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


i cant use execute because it returns boolean, what do you think?

Why can't you? You were not using the return type anyway, so what's the difference?

(Also, why are you using a Vector to encapsulate your data? Do you need synchronized code? Why not use a custom class?)
[ September 16, 2008: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No ResultSet set was produced