How can I check if a global contains an open database?
You can find out if a global (or any variable, or property) contains an open database by using the script below.
on testIfDatabase vDB
-- Check if the value is a child of the VDatabase Xtra
if string(vDB) starts "-- Check if this child has a database reference otherwise
-- openDatabase() has probably not been run succesfully
if vDB.getRef() <> 0 then
return TRUE
end if
end if
-- Not an open database
return FALSE
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA