<div dir="ltr">Hi Johnny,<div><br></div><div>If you use cursor only in one method locally, you can also create it in a <b>using</b> block.</div><div>It will be disposed automatically at the end of this block, for example :</div>
<div><div><br></div><div>using( IVCursor cursor = db.SqlSelect( "SELECT * FROM tblPerson" ) )</div><div>{</div><div><span class="" style="white-space:pre">   </span>// Some code to get data from cursor</div><div>}</div>
</div><div><br></div><div>Best regards,</div><div>Sergey Pashkov.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 1:39 PM, Johnny Harris <span dir="ltr"><<a href="mailto:johnny@southshore.com" target="_blank">johnny@southshore.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="WORD-WRAP:break-word" dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:'Calibri'">
<div>Thank You Ivan,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>It is working fine now.</div>
<div> </div>
<div>Best Regards,</div>
<div>Johnny Harris</div>
<div style="font-style:normal;font-size:small;display:inline;font-family:"Calibri";text-decoration:none;font-weight:normal">
<div style="FONT:10pt tahoma">
<div> </div>
<div style="BACKGROUND:#f5f5f5">
<div><b>From:</b> <a title="ivan_smahin@paradigmasoft.com" href="mailto:ivan_smahin@paradigmasoft.com" target="_blank">Ivan Smahin</a> </div>
<div><b>Sent:</b> Monday, March 31, 2014 12:09 AM</div><div class="">
<div><b>To:</b> <a title="valentina@lists.macserve.net" href="mailto:valentina@lists.macserve.net" target="_blank">Valentina Developers</a> </div>
<div><b>Subject:</b> Re: VDN - Primary Key Constraint & Boolean Fields 
Question</div></div></div></div>
<div> </div></div>
<div style="font-style:normal;font-size:small;display:inline;font-family:"Calibri";text-decoration:none;font-weight:normal">
<div> </div><div><div class="h5">
<div>
<div>On Mar 30, 2014, at 5:04 PM, Johnny Harris <<a href="mailto:johnny@southshore.com" target="_blank">johnny@southshore.com</a>> 
wrote:</div><br>
<blockquote type="cite">
  <div style="WORD-WRAP:break-word" dir="ltr">
  <div dir="ltr">
  <div style="FONT-SIZE:12pt;FONT-FAMILY:calibri">
  <div>Ivan,</div>
  <div> </div>
  <div>I can update the record now using the cursor.UpdateRecord method, but the 
  lock stays on the record unless I close the connection (VConnection).</div>
  <div> </div>
  <div>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.</div>
  <div> </div>
  <div>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</div>
  <div>connection is kept open.</div>
  <div> </div></div></div></div></blockquote></div>
<div> </div>You should close (destroy) the cursor to release all the locks. 

<div>See our examples.</div>
<div>
<div> </div>
<div><span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;font-family:helvetica;font-weight:normal;word-spacing:0px">
<div>-- <br>Best regards,<br>Ivan Smahin<br>Senior Software 
Engineer<br>Paradigma Software, Inc<br>Valentina - The Ultra-Fast Database<br><a href="http://www.valentina-db.com/" target="_blank">http://www.valentina-db.com</a></div></span></div>
<div> </div></div>
</div></div><p>
</p><hr><div class="">
_______________________________________________<br>Valentina mailing 
list<br><a href="mailto:Valentina@lists.macserve.net" target="_blank">Valentina@lists.macserve.net</a><br><a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
</div><p></p></div></div></div></div>
<br>_______________________________________________<br>
Valentina mailing list<br>
<a href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</a><br>
<a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
<br></blockquote></div><br></div>