Close all open databases -- VDataBase_Open()
Mark Schonewille
m.schonewille at economy-x-talk.com
Mon Oct 14 09:04:56 CDT 2013
Hi everyone,
Now that I know how to execute the SHOW DATABASES query, using the script
function queryTest
put VDatabase_SqlSelect(lDatabase,"SHOW DATABASES") into myCursor
// put vDatabase_SqlQuery(lDatabase,"SHOW DATABASES") into myCursor
put VCursor_RecordCount(myCursor) into myRecordCount
put VCursor_GetRecords(myCursor,1,myRecordCount,tab,cr) into myData
put VCursor_Destructor(myCursor) into myCursor
return myData
end queryTest
which we discussed before, (i.e. without the syntax causing the crash),
it occurs to me that contrary what Ruslan argues no database ID's or
cursors are returned. So, the question remains:
how do I get a list of all open databases, for use in a repeat loop that
closes all databases, like so:
put valentina_openDatabases() into myOpenDatabases
repeat for each item myDatabase in myOpenDatabases
get vDatabase_Close(myDatabase)
end repeat
(Keep in mind that I made up this syntax, there is no
valentina_openDatabases() function).
--
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/13/2013 17:48, Ruslan Zasukhin wrote:
> On 10/13/13 5:34 PM, "william humphrey" <bill at bluewatermaritime.com> wrote:
>
>> I looked through that PDF and did not find any command which lists the names
>> of the open databases.
>
> This can be done via SQL
>
> SHOW DATABASES
>
> You get cursor, iterate it, get names
>
>
More information about the Valentina
mailing list