Close all databases - CRASH
Mark Schonewille
m.schonewille at economy-x-talk.com
Mon Oct 14 07:27:03 CDT 2013
Hi Ruslan,
This is my script:
function queryTest
// put VDatabase_SqlSelect(lDatabase,"SHOW DATABASES") into myCursor
put vDatabase_SqlQuery(lDatabase,"SHOW DATABASES") into myCursor
put VCursor_RecordCount(myCursor) into recNum
put VCursor_GetRecords(myCursor,1,recNum,tab,cr) into myData
put VCursor_Destructor(myCursor) into myCursor
return myData
end queryTest
lDatabase is a locally defined variable that contains a valid
databaseID. VDatabase_SqlSelect() works but vDatabase_SqlQuery()
doesn't. It crashes at VCursor_GetRecords().
Please, explain how to use QueryResult in LiveCode. Documentation for
LiveCode doesn't exist at
http://www.valentina-db.com/docs/dokuwiki/v5/doku.php?id=valentina:products:adk:api:vqueryresult_class:vqueryresult_class
This page just says something like "yup, there are properties, but we
won't tell you what properties are and how to use them".
I've also searched the PDF at
http://www.valentina-db.com/docs/v5/VCOM_Reference_5_en.pdf for
"QueryResult" and got no results.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/
On 10/14/2013 14:09, Ruslan Zasukhin wrote:
> On 10/14/13 2:52 PM, "Mark Schonewille" <m.schonewille at economy-x-talk.com>
> wrote:
>
> Hi Mark,
>
>> Ruslan,
>>
>> If I use vDatabase_SqlQuery() followed by VCursor_GetRecords(), LiveCode
>> crashes consistently.
>
> 1)
>
> But how you do this?
>
> VCursor_GetRecords() need cursorRef
>
> You can get it only from vDatabase_SqlSelect()
>
> But not from SQLQuery(), which returns QueryResult
> -- a very different thing.
>
>
>
> 2) during development, to avoid often crashes, on such mistakes,
> It is a good idea to use
>
> Valentina_DebugLevel
>
> Feature.
>
> It prevent from crashes, thanks to special checks.
> And you will see in V4REV_LOG file yet messages,
> That you have provide wrong cursorRef
>
>
>
More information about the Valentina
mailing list