Using Free Tables

Topics: Developer Forum, User Forum
Feb 8, 2012 at 4:43 PM

I just want to make I'm understanding this properly.

When I use a table in one html and go to another html that table remains open.  However, it doesn't  seem possible to select that table without issuing another use statement.  Is this correct?  Do I need to close tables everytime I go to a new html?  Or is there a way to access tables that are already open?

Thanks for the help.

BR

Feb 9, 2012 at 1:05 AM

It's not qa good idea mantain tables opened,  I sugest to alwayss close and reopen at each page.

 

But just in case you want to do the wrong thing, use select ('tablename') if the table is already opened they will be selected

Feb 9, 2012 at 2:42 PM

I'm presently in the same situation and was wondering the same thing.
I did not see any closing of table in the sample "simplelist" or "sessionlist".

I guess we should keep the table name and path in a cookie for re-use or is there another way?

 

Thanks

Feb 9, 2012 at 3:09 PM

I could be wrong, but I think the tables stay open on the server if you don't close them even if you completely close your browser.  So, now I'm thinking that I'm going to have to periodically close all the tables because they're bound to stay open when users close their browsers unexpectedly.

Thanks.

Feb 11, 2012 at 3:00 AM

Ate the end off each page do soemthing like that to close to clsoe the used pages, does not have any advantage in mantaim a opened table

 

</body>
</html>
<%
Select bd1
use
Select bd2
use
select bd3
use
select bd4
use
select bd5
use
%>

Feb 11, 2012 at 3:03 AM

When the browser issue a get, and you are not using any kind off ajax, if you have procedure to close the table on the page, The page will be closed because the get fired the full page, on other hand, on ajax uses, you must fire a close table get, on the on close event

Mar 21, 2012 at 9:43 PM

If it's better to close all tables in each html page, and assuming you're working from the samples provided in the download, why not just include the following in the footer.htm?

<% close tables all %>

Wouldn't that be faster and easier than closing each table individually?

Mar 21, 2012 at 9:54 PM
joncp wrote:

If it's better to close all tables in each html page, and assuming you're working from the samples provided in the download, why not just include the following in the footer.htm?

<% close tables all %>

Wouldn't that be faster and easier than closing each table individually?


I don't know if it would be faster or even if the time involved would be at all noticable.

But, what if it never makes it to the footer.htm?  Suppose your html code errored out.  Guess what.  The only way you're going to get those tables closed is by restarting the server.

I think you're better off closing them immediately after using them.

Mar 21, 2012 at 10:34 PM

I was just offering this as an easier alternative to the previous example, which added the explicit closing of each table at the end of the page. By adding my suggestion to only the footer.htm, it would close the tables at the end of each and every page with no additional coding required. However, if one's code errors out before reaching the footer on a routine basis, I expect that the occasional table being left open would be the least of their worries...

Mar 22, 2012 at 1:17 AM

I don't know of there being any danger of tables being open and staying open on the server.  Depending on how much usage the server gets, I would recommend restarting the server from time to time just to clear out all those open tables.

Mar 22, 2012 at 3:03 AM

You can use try

TRY...CATCH...FINALLY Command

and inside the finally put the close tables

If you want a safe patch to close the tables case something goes wrong