There are many ways to do that. Like you I never use the pointer, or whatever its called, which loads all the records in a SQL query and then goes through them. I always pull out the specific record I want with all the related tables and parse that out in the fields on my Livecode card. <div>
<br></div><div>I use variations of:</div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <span style="color:#878400"><b>put</b></span> VDatabase_SqlSelect( gDatabase, tSQL ) <span style="color:#881e87">into</span> CursorRef</p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <span style="color:#878400"><b>put</b></span> VCursor_RecordCount(CursorRef) <span style="color:#881e87">into</span> recNum</p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <b>if</b> recNum > <span style="color:#001887">0</span> <b>then</b></p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <span style="color:#878400"><b>put</b></span> VCursor_GetRecord( CursorRef,, <span style="color:#881e87">tab</span> ) <span style="color:#881e87">INTO</span> tTextHolder</p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <b>else</b></p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> CallMyError</p>
<p style="margin:0px;font-size:11px;font-family:'Lucida Grande'"> <b>end</b> <b>if</b></p><div><br></div>I hope this helps. Honestly I do lots and lots of stuff just with that one method. I never could figure out the many other methods that are possible.</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Oct 10, 2012 at 7:13 AM, DMW <span dir="ltr"><<a href="mailto:consult@excelkb.com" target="_blank">consult@excelkb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<p dir="LTR"><span lang="sv"><font face="Calibri">Hi all,</font></span></p>
<p dir="LTR"><span lang="sv"></span><span lang="en-us"><font face="Calibri">After working a lot with SQL I have decided to explore and lear</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri">n more about Valentinas APIs.</font></span><span lang="sv"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">The samples at the Wiki is quite simplified and do not provide enough guidelines enabling me to understand some aspects here.</font></span></p>
<p dir="LTR"><span lang="sv"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Q1: If I want to show a specific record</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri">’s data</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> (not the first, not the last, not the next, not the previously)</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri">.</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"></font></span><span lang="sv"></span><span lang="en-us"><br>
</span><span lang="sv"></span><span lang="en-us"><font face="Calibri">I need to make some kind of look up first</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> – how do I do that?</font></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">Second,</font></span><span lang="sv"></span><span lang="en-us"> <font face="Calibri"></font></span><span lang="sv"></span><span lang="en-us"> <font face="Calibri">I want to</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> grab the</font></span><span lang="sv"></span><span lang="en-us"> <font face="Calibri">data</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> for that record and show it in the Form</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> -</font></span><span lang="sv"></span><span lang="en-us"><font face="Calibri"> How do I do that?</font></span><span lang="sv"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">That’s all for now!</font></span><span lang="sv"></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">TIA,<br>
Dennis</font></span><span lang="sv"></span><span lang="en-us"></span></p>
</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><br clear="all"><div><br></div>-- <br><a href="http://www.bluewatermaritime.com">http://www.bluewatermaritime.com</a><br>
</div>