Close all databases - CRASH

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Oct 14 09:21:13 CDT 2013


Hi Ruslan and anyone following this,

I tried Ruslan's suggestion and it works. The complete, correct LiveCode 
function is:

function queryTest2
    put vDatabase_SqlQuery(lDatabase,"SHOW DATABASES") into myQueryResultID
    put vQueryResult_Cursor(myQueryResultID) into myCursor
    put VCursor_RecordCount(myCursor) into myRecordCount
    put VCursor_GetRecords(myCursor,1,myRecordCount,tab,cr) into myData
    put VCursor_Destructor(myCursor) into myCursor
    put vQueryResult_Destructor(myQueryResultID) into myQueryResultID
    return myData
end queryTest2

I guess this would be useful in some tutorial. Error checking would have 
to be added.

Unfortunately, the query doesn't return a list of ID numbers for all 
open databases, but we can discuss that in another thread (I posted it 
with the subject "Close all open databases -- VDataBase_Open()".

--
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 16:03, Ruslan Zasukhin wrote:
> On 10/14/13 4:32 PM, "Mark Schonewille" <m.schonewille at economy-x-talk.com>
> wrote:
>
>
> There is documentation:
>
>      http://www.valentina-db.com/docs/v5/V4REV_Reference_5_en.pdf
>
>
> Page 28
>
> Yes here simply 4-5 properties.
>
>
>   put VDatabase_SqlQuery( q )  into queryResultRef
>
>   put VQueryResult_Type( queryResultRef  ) into typeOfRes
>
>   if(  typeOfRes = 1 )  // this is cursor
>         put VQueryResult_Cursor( queryResultRef ) into cursorRef
>   end if
>
>        .. Work with cursor
>
>
> VQueryResult_Destructor( queryResultRef  )
>
>
>
> Ok we will update PDF today later.
>
>
>
>


More information about the Valentina mailing list