x

Function sequence error (SQL-HY010)

I am having a SP with nested Cursors. The SP is called inside a Perl script.

While running the Perl script for the first time the SP is exiting with error:

ERROR executing sp: [DataDirect][ODBC SQL Server Driver]Function sequence error (SQL-HY010)(DBD: st_fetch/SQLFetch err=-1) Return : -1

The SP runs fine when attempted twice/thrice.

Could anyone please provide me some inputs?

more ▼

asked Jun 08 '10 at 06:34 PM in Default

Pratyus 1 gravatar image

Pratyus 1
1 1 1 1

First thing to check would be to determine whether Perl/Odbc Driver causes it or not by executing procedure from SSMS. If it returns error then it is not Perl, but the procedure itself. Without looking at your proc there is no way to tell, but it is possible that if there is something wrong with the proc when it is executed for the first time, you will get better clue from the error information in SSMS results pane.
Jun 08 '10 at 07:07 PM Oleg
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

This is probably a driver level bug. Without seeing the source - either to your Perl script neither to the underlying ODBC layer, it's difficult to tell. However, from my experience of ODBC, there isn't any requirement to call anything in between SQLExecute / SQLExecDirect and SQLFetch - so I'm not sure what the issue is.

Sorry to not be much help.

more ▼

answered Jun 09 '10 at 04:19 AM

Matt Whitfield gravatar image

Matt Whitfield ♦♦
29.4k 61 65 87

I agree. That's not a standard error on the server side of things.
Jun 09 '10 at 09:06 AM Grant Fritchey ♦♦
The SSMS is running fine without any error. It seems to me that the ODBC is having the bug. Any help on how to zero down the issue.
Jun 09 '10 at 11:54 AM Pratyus 1
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x37
x2

asked: Jun 08 '10 at 06:34 PM

Seen: 2366 times

Last Updated: Jun 09 '10 at 03:51 AM