When you've messed things up - it would be nice to be able to "sqlyoga_Reset"
Handlers such as sqlyoga_getDatabases(), sqlyoga_getDefaultDatabase(), dbobject_GetArrays() must I guess store their values as script locals in the locked sqlYoga library. So there is no global we can manually reset, and we are forced to restart Revolution - or at least I think it is the only way. It can be a little hard working out what is going on with locked stacks, so it would be nice to have an explanation of where things like dbobject_GetArrays() are stored - and preferably have not just "get" but "set" and "delete" for all these things?
Background - in case you want to know how I messed up
When debugging an issue with not being able to delete records, I got myself into a mess. I tried to create a database object which was not named "default" - so I could look at the example code while working on my db, and tried to manually clone the array, with code that looks like:
Code: Select all
on menu_CloneDatabase dbKey
put dbobject_GetArrays() into yogaArrays
put dbobject_Get ("storage object") into storageObject
-- get the uSQLDatabaseObject of storageObject
put "Copy of" && dbKey into newName
put opn_Ask ("What do you want to call the new database?", newName) into newDBKey
put yogaArrays [dbKey] into yogaArrays [newDBKey]
display_Array yogaArrays
set the uSQLDatabaseObject of storageObject to yogaArrays
end menu_CloneDatabase