[V4RB] Two cursors at once?

Ivan Smahin ivan_smahin at paradigmasoft.com
Fri Apr 29 02:44:54 CDT 2011


On 4/29/2011 2:06 AM, Bill Mounce wrote:
> I understand that you can't have two read/write cursors open on the same database at the same time, but shouldn't you be able to have one open and another read only cursor open on the same database? I am on 4.8.
>
> I have been using Valentina forever, and maybe this is something that has changed over the years. In fact, I thought I remembered reading it somewhere.
>
> But whenever I have a read/write cursor open, and when I execute the following command with a second, local cursor, I always get a VException:
>
> tCursor = myDatabase.SQLselect( strSQL, EVCursorLocation.kServerSide, EVLockType.kReadOnly, EVCursorDirection.kForwardOnly )
>
> Should this SQLSelect cause a problem?
>
I guess we are speaking of the same record set (or some intersection ) 
which both cursors should return.
In this case first cursor set RW locks to all selected records. RW lock 
prevents setting another lock on those records.
But you can read them from another cursor without any locks - using  
EVLockType.kNoLocks

-- 
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list