<div dir="ltr">Valentina has Mantis an excellent bug reporting feature. <div><br></div><div><a href="http://valentina-db.com/bt/my_view_page.php">http://valentina-db.com/bt/my_view_page.php</a> is the link to Mantis if you want to report the bug there. They are very good about fixing bugs and Mantis lets you know when it is assigned and what the results are.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 3, 2015 at 10:52 AM, Mark Schonewille <span dir="ltr"><<a href="mailto:m.schonewille@economy-x-talk.com" target="_blank">m.schonewille@economy-x-talk.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ivan,<br>
<br>
Thanks for your reply. If I replace vDatabase_SqlQuery() with vDatabase_SqlSelect() I get a record, so myCursor must be a cursor reference. If it weren't, it would be a bug in Valentina.<br>
<br>
The point, however, is that if the cursor reference for some reason is not correct, LiveCode (i.e. the Valentina external) shouldn't crash but receive an error from Valentina and return this error instead of the cursor reference. This doesn't happen: myCursor contains the number 2 and no error.<br>
<br>
I think this is a bug and I guess we have to avoid using vDatabase_SqlQuery() until it gets fixed.<span class="im HOEnZb"><br>
<br>
--<br>
Best regards,<br>
<br>
Mark Schonewille<br>
<br>
Economy-x-Talk Consulting and Software Engineering<br>
Homepage: <a href="http://economy-x-talk.com" rel="noreferrer" target="_blank">http://economy-x-talk.com</a><br>
Twitter: <a href="http://twitter.com/xtalkprogrammer" rel="noreferrer" target="_blank">http://twitter.com/xtalkprogrammer</a><br>
KvK: 50277553<br>
<br>
Installer Maker for LiveCode:<br>
<a href="http://qery.us/468" rel="noreferrer" target="_blank">http://qery.us/468</a><br>
<br>
Buy my new book "Programming LiveCode for the Real Beginner" <a href="http://qery.us/3fi" rel="noreferrer" target="_blank">http://qery.us/3fi</a><br>
<br>
LiveCode on Facebook:<br>
<a href="https://www.facebook.com/groups/runrev/" rel="noreferrer" target="_blank">https://www.facebook.com/groups/runrev/</a><br>
<br></span><span class="im HOEnZb">
On 8/3/2015 08:41, Ivan Smahin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Mark,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Aug 3, 2015, at 2:38 AM, Mark Schonewille <<a href="mailto:m.schonewille@economy-x-talk.com" target="_blank">m.schonewille@economy-x-talk.com</a>> wrote:<br>
<br>
Hi,<br>
<br>
I have the following (slightly abbreviated) LiveCode script:<br>
<br>
put "SELECT * FROM table1" into mySQL<br>
put vDatabase_SqlQuery(gID,mySQL) into myCursor<br>
put vCursor_recordCount(myCursor) into myRecordCount<br>
put vCursor_getRecord(myCursor,tab,cr) into myData<br>
<br>
The above script crashes LiveCode and myRecordCount contains the number 2 instead of the expected number of 35 records. It works fine if I replace vDatabase_sqlQuery() with vDatabase_sqlSelect().<br>
Is this a bug? Do I do something wrong here? Is vDatabase_SqlQuery() deprecated?<br>
<br>
</blockquote>
<br>
But vDatabase_SqlQuery returns VQueryResult - not VCursor.<br>
Then, based on VQueryResult_Type you should get either cursor or "affected row count" value.<br>
So it must be something like this one:<br>
<br>
...<br>
dim queryResult as VQueryResult<br>
put vDatabase_SqlQuery( gID, mySQL ) into queryResult<br>
-- if queryResult is cursor type<br>
put VQueryResult_Cursor( queryResult ) into myCursor<br>
...<br>
<br>
</blockquote></span><div class="HOEnZb"><div class="h5">
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><a href="http://www.bluewatermaritime.com" target="_blank">http://www.bluewatermaritime.com</a></div>
</div>