Close all open databases -- VDataBase_Open()

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Oct 14 06:25:38 CDT 2013


Thanks William,

Again, it was a documentation problem. In many places in the WIKI, the 
number of records is optional. Apparently, this is a mistake.

Deleting the cursor is a good hint. Thanks for reminding me of it.

--
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 04:03, william humphrey wrote:
> function queryTest
> put "__SHOW DATABASES" into tSQL
>
> *put* VDatabase_SqlSelect( lDatabase, tSQL ) into myCursor
>
> -- try sqlselect instead of sqlquery also
>
> --    put vDatabase_SqlQuery(lDatabase,"__SHOW DATABASES") into myCursor
>
> -- although sql query should work
>
> *put* VCursor_RecordCount(myCursor) into recNum
>
>     put VCursor_GetRecords(myCursor,1,recNum,__tab,cr) into myData
>
> *put* VCursor_Destructor(myCursor) into myCursor
>
> -- can't leave un-destructed cursors laying around
>
> -- good practice or when database does fancy restore after crash
>
> -- all the data which has open cursor is lost
>
> -- this is not clear in any documentation because journaling that does
> fancy stuff
>
> -- was added later
>
>     return myData
> end queryTest
>
>


More information about the Valentina mailing list