PDA

View Full Version : Error: The statement did not return a result set with sql server 2008 driver



archana.kulkarni
2nd March 2010, 09:26 PM
Error: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set with sql server 2008 driver

This happens when a proc execute DML before producing a result set.
Solution is to “SET NOCOUNT ON” in data-source properties.

Modify data source and then add one property with
Type: SQL Name: SET NOCOUNT ON

http://www.seemoredata.com/en/../wiki/_media/troubleshooting:datasources:nocount_on.png (http://www.seemoredata.com/en/../wiki/_detail/troubleshooting:datasources:nocount_on.png?id=trou bleshooting%3Adatasources%3Amicrosoft_sql_server)

mary123
19th January 2011, 02:42 PM
Hello,
I tried using the function suggested by you in derby query, but i got an error saying format_timestamp not recognized.
can you pls provide some more information which i am missing.

FerencMantfeld
19th January 2011, 04:02 PM
Hi Mary

Please see my answer to this exact question at http://www.seemoredata.com/en/showthread.php?42-using-Derby-database-Timestamps-intelligently&highlight=timestamp

What it states is that this function SHOULD ideally be part of standad Derby but is not and this is why you are getting the error. You will need to extend Derby with a custom function for this. We created this function out of frustration and badly needing a way to format Derby timestamps like we can do with Oracle and to_char(date, <<MASK>> )

I will chat with our engineering team to see if we can make this function available for download to members of the forum