Alpha Video Training
Results 1 to 12 of 12

Thread: Maximum Session Open Tables exceeded

  1. #1
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Maximum Session Open Tables exceeded

    Hello

    I am experiencing this error when trying to open sets or tables. I did find one thread which suggested that a tbl.close() command was required, but I'm not sure if that applies to my situation. Exiting and re entering Alpha eliminates the issue, but I would like to understand why its happening before I put together install packages for end users.

    Any help would be greatly appreciated

    Cheers

    Jason

  2. #2
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: Maximum Session Open Tables exceeded

    If you just open and close forms then table.close() is not required.
    It seems to me you are probably running an xbasic script and not closing a table.
    If so, post the script and we can suggest a solution.

  3. #3
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Re: Maximum Session Open Tables exceeded

    Hi Garry

    Thanks for the quick reply. I am using scripts, in most instances one script opens the form, another closes the form via the on push event behind a button. The majority of my scripting is action scripting rather than creating it via x basic.

    I cant see how my basic approach isnt closing the table, or am I incorrect in assuming that when I close a form, the table attached to that form is also closed?

    Cheers

  4. #4
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: Maximum Session Open Tables exceeded

    Below is a script to show you which tables are open.
    Open then close a form then run the script to see if the table underlying the form is open. If so, there is a problem with the way you are closing the form.


    Code:
    dim shared sOpenFiles as C
    sTables=a5_table_enum_actual(.f.)
    sOpenFiles=""
    *for_each(sFileName,compile_filename_in_use(sFileName),sTables)
    
    sOpenFiles = sortsubstr(sOpenFiles, crlf())
    
    
    code = <<%dlg%
    {frame=1,1}
    {region}
    
    Open tables:| [%wr%.60,20sOpenfiles];
    {endregion};
    
    
    {line=1,0};
    {region}
    <*15OK>
    {endregion};
    %dlg%
    
    ui_dlg_box("Open tables",code)
    
    sys_send_keys("{+pgup}")
    
    end
    
    FUNCTION compile_filename_in_use as L (sFilename as C)
    	on error goto Continue
    	t = table.open(sFileName,FILE_RW_EXCLUSIVE)
    	t.close()
    	end
    	Continue:
    	sOpenFiles =  sOpenFiles + sFileName + crlf()   
    	on error goto 0
    END FUNCTION
    Last edited by Garry Flanigan; 08-10-2009 at 04:48 AM.

  5. #5
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Re: Maximum Session Open Tables exceeded

    thanks Garry. Your code ran perfectly, but it shows no tables as being open even if I manually open tables or datasets and leave them open while running the script.

    Thanks for taking time out to send the code, perhaps I havent configured something correctly hence the null result from your script.

    Cheers

  6. #6
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Re: Maximum Session Open Tables exceeded

    Garry

    The script is now showing results, I have been working with a browse in design mode for a while, ran the script and it shows all of my tables as being open. Is that normal for active linked tables?

    cheers

  7. #7
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: Maximum Session Open Tables exceeded

    The script goes through all tables and compiles a list of files it cannot open exclusively. This script is intended only for native Alpha data tables.
    When a set is open, it is not possible to separately get an exclusive lock on any table in the set.
    You mention active link tables whereas I assumed you are using dbf tables.
    I need a much better description of what you are doing in order to assist.

  8. #8
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Re: Maximum Session Open Tables exceeded

    Sorry about that, I thought I mentioned SQL in a previous message

    In short, I have an alpha front end and a SQL dbase backend. The tables showing via the alpha front end are actively linked tables. From time to time, I try to open a form or table from within Alpha and I receive the maximum session open tables exceeded message. I'm trying to understand what triggers this error, perhaps there is a limit to the number of actively linked tables that can bought through into Alpha? My database only has approximately 25 tables with some additional views, so I dont imagine that being a problem

    thanks

  9. #9
    Member compuaid's Avatar
    Real Name
    Brad Weaver
    Join Date
    Aug 2007
    Location
    Ottawa, ON
    Posts
    386

    Default Re: Maximum Session Open Tables exceeded

    I'm designing an Active Link database using only FOUR tables and upon editing a couple of different sets defined against these four tables I am getting the "Maximum Session Open Tables exceeded" error as well. This appears to be an issue with Active Tables and the designer.
    Brad Weaver, President
    ComputerAid International
    Ottawa ON Canada
    Versailles KY USA
    www.compuaid.com

  10. #10
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Maximum Session Open Tables exceeded

    Just for clarification (or confusion!?)---
    If you just open and close forms then table.close() is not required.
    This is true, but a table can be left open as a form opened as modal needs to be closed out of memory (from the initial calling script) and if not will leave a table open even though the form has been closed from display.

    Ex:Open Form_2 as modal from the OnPush event of a button on Form_1. Now when on Form_2 have a button that closes Form_2. Form_2 is still open in memory. The calling script that in on Form_1's button was paused immediately after calling and showing Form_2---it now continues. The last piece of script on this event has to close Form_2 (which closes it from memory). Normally Action Script will do this for the user automatically.
    Last edited by MikeC; 10-02-2009 at 06:23 PM.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  11. #11
    Member
    Real Name
    Dean Buccheri
    Join Date
    Mar 2006
    Posts
    38

    Default Re: Maximum Session Open Tables exceeded

    I am also seeing this problem. I am also using alpha front end to SQL backend. However, I am not using modal forms and I am using action scripting only, no xbasic.

    I am curious if people having the problems are using V9 or V10.

  12. #12
    Member
    Real Name
    Jason Christiansen
    Join Date
    Mar 2009
    Location
    Brisbane Australia
    Posts
    167

    Default Re: Maximum Session Open Tables exceeded

    I had the problem when I was building a desktop version. Ever since I moved to a web based system, I havent had the error. I work with V9

Similar Threads

  1. maximum session open tables exceeded using table.external record content get
    By boba in forum Alpha Five Version 9 - Desktop Applications
    Replies: 8
    Last Post: 08-19-2009, 01:45 AM
  2. Alpha Error Codes: 1165 - Maximum session open tables exceeded
    By cjw423 in forum Alpha Five Version 7
    Replies: 3
    Last Post: 03-31-2009, 11:00 AM
  3. maximum open tables exceeded
    By Tom Hlavin in forum Alpha Five Version 4
    Replies: 7
    Last Post: 03-04-2009, 10:38 AM
  4. Maximum open tables exceeded
    By mmaisterrena in forum Application Server Version 9 - Web/Browser Applications
    Replies: 12
    Last Post: 03-04-2009, 09:48 AM
  5. Maximum session open tables exceeded
    By jas in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 09-08-2008, 04:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •