db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: Function sequence error
Date Thu, 24 Nov 2005 00:43:25 GMT
Nicolas Dufour wrote:
> I have a very strange exception I dont understand at all !
> Error with Flown XY query results.java.sql.SQLException: [IBM][CLI 
> Driver] CLI0125E  Function sequence error. SQLSTATE=S1010
> Query
> as [call get_map_flown_track_batch
> ('362430903,362417493,362396877,362416037,362426968,362402729,362409152,362431708,362438311,362423838,362403122,362447641,362384606,362380184')]

> java.sql.SQLException: [IBM][CLI Driver] CLI0125E  Function sequence 
> error. SQLSTATE=S1010

I wrote both a Java and C++ program to call your procedure and return the 
results, and both programs worked without problem.  Then, in my C++ program 
(which runs using the IBM ODBC driver), I added an explicit "commit" call after 
executing the query but before fetching any results.  After doing that, attempts 
to fetch the results caused the "Function sequence error" that you are seeing.

So my guess is that somewhere between the time you call your procedure and the 
time you try to fetch the results, a commit is being executed and that's closing 
the result set.

In order to find out if that's the case, try adding the following line to your 
Java procedure, right after you get the connection:


And see what happens.  If you still see the same error (and you're running with 
an up-to-date 10.1 or 10.2 codeline), then I guess the problem is elsewhere; if, 
however, the problem goes away, then it is probably the case that a commit 
somewhere is causing the result set to close.

Note that a fix for holdability inside procedures was checked into the 10.1 and 
10.2 codelines with DERBY-498; if you don't have that fix in your codeline, then 
adding the above line probably won't change anything...


View raw message