VDN - Primary Key Constraint & Boolean Fields Question

Sergey Pashkov sergey_pashkov at valentina-db.com
Mon Mar 31 05:57:20 CDT 2014


Hi Johnny,

If you use cursor only in one method locally, you can also create it in a
*using* block.
It will be disposed automatically at the end of this block, for example :

using( IVCursor cursor = db.SqlSelect( "SELECT * FROM tblPerson" ) )
{
// Some code to get data from cursor
}

Best regards,
Sergey Pashkov.


On Mon, Mar 31, 2014 at 1:39 PM, Johnny Harris <johnny at southshore.com>wrote:

>   Thank You Ivan,
>
> I discovered this late yesterday evening. I was just setting the cursor to
> Nothing, but realized I need to call cur.Dispose to totally destroy the
> cursor.
>
> It is working fine now.
>
> Best Regards,
> Johnny Harris
>
>  *From:* Ivan Smahin <ivan_smahin at paradigmasoft.com>
> *Sent:* Monday, March 31, 2014 12:09 AM
> *To:* Valentina Developers <valentina at lists.macserve.net>
> *Subject:* Re: VDN - Primary Key Constraint & Boolean Fields Question
>
>
>  On Mar 30, 2014, at 5:04 PM, Johnny Harris <johnny at southshore.com> wrote:
>
>   Ivan,
>
> I can update the record now using the cursor.UpdateRecord method, but the
> lock stays on the record unless I close the connection (VConnection).
>
> Is there a way to release the lock without having  to close the
> connection? Sorry for such a basic question, but I can find anything in the
> docs.
>
> In my code for the Update you can see I call a CloseDatabase() method in
> my class, but it only closes the connection if a flag is set to True,
> otherwise the
> connection is kept open.
>
>
>
> You should close (destroy) the cursor to release all the locks.
> See our examples.
>
>  --
> Best regards,
> Ivan Smahin
> Senior Software Engineer
> Paradigma Software, Inc
> Valentina - The Ultra-Fast Database
> http://www.valentina-db.com
>
>
> ------------------------------
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20140331/d0c849ae/attachment.html>


More information about the Valentina mailing list