I know there is a way to do this, but maybe someone can remind me of what command I use to see if a table is open and what cursors are in use. I tried used("table"), but it did not appear to work.