----- Original Message ----- 
From: "Mark Rotteveel" <[email protected]>
To: "For discussion among Firebird Developers" 
<[email protected]>
Sent: Thursday, July 24, 2014 7:35 PM
Subject: Re: [Firebird-devel] setCursorName in IResultSet rather thanIStatement


> On 23-7-2014 17:59, Adriano dos Santos Fernandes wrote:
>> Hi!
>>
>> After I reported an TCS fail to Alex in January, he moved this method
>> from IStatement to IResultSet.
>>
>> But I fail to understand. Not talking about implementation detail, but
>> about interface.
>>
>> IMO makes no sense to first open the cursor and then name it later.
>>
>> We can have two prepared statement, while the second uses the cursor
>> name of the first. But now we need to open the first before prepare the
>> second.
>>
>> Isn't this just wrong?
> 
> I'd think so. This should clearly be a feature of the statement. This is 
> for example also the case in JDBC, see 
> http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#setCursorName-java.lang.String-
> 
> If you look at the SQL standard (CLI), then setting the cursor name is 
> also associated with the statement. It even explicitly says that 
> assigning a cursor name to a statement that has an open cursor should 
> raise an invalid cursor state exception.
> 
> As far as I understand it, you can't have an IResultSet unless the 
> result set is open, so setting the cursor name on an IResultSet is not 
> very logical.

    What about more than one simultaneously active result set produced by the 
same statement ?

Regards,
Vlad

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to