VDN - Primary Key Constraint & Boolean Fields Question

Johnny Harris johnny at southshore.com
Mon Mar 31 07:25:06 CDT 2014


Hi Sergey,

I just checked out the Using statement on MSDN. Looks like a perfect fit here.

Thanks for the tip.

Best Regards,
Johnny Harris

From: Sergey Pashkov 
Sent: Monday, March 31, 2014 5:57 AM
To: Valentina Developers 
Subject: Re: VDN - Primary Key Constraint & Boolean Fields Question

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 
  Sent: Monday, March 31, 2014 12:09 AM
  To: Valentina Developers 
  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





--------------------------------------------------------------------------------
_______________________________________________
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/cde41699/attachment.html>


More information about the Valentina mailing list