How can a table be the current table if it's parent database is closed?
- Posted by K_D_R Feb 09, 2012
- 1774 views
I have a routine which lists the current database, current table and all other open databases.
If I open a table and then close its parent database db_current_table still reports it as the current table.
If I select or open another database, db_current becomes undefined as expected and the routine likewise performs as expected:
procedure db_banner(sequence operation) set_top_line(" ") text_color(TOP_LINE_TEXT_COLOR) current_db = filebase(db_current()) printf(SCREEN, "%s",{current_db}) text_color(TOP_LINE_DIM_COLOR) puts(SCREEN, ":") current_table = db_current_table() --<<----------------- text_color(TOP_LINE_TEXT_COLOR) printf(SCREEN, "%s", {current_table}) text_color(TOP_LINE_DIM_COLOR) ----- -- snip ----- end procedure
Shouldn't the db_current_table become undefined if its parent db is closed?
Regards, Kenneth Rhodes