Alpha Video Training
Results 1 to 4 of 4

Thread: Error loading table: maximum session open tables exceeded

  1. #1
    Member MikeData's Avatar
    Real Name
    Mike Data
    Join Date
    Nov 2008
    Posts
    916

    Default Error loading table: maximum session open tables exceeded

    Code:
    error on line 22
              loading t_competiontype: maximum session open tables exceeded
    
    
    t_member.dbf  = 106 rec
    t_competiontype = 13 rec
    t_comptypememb   (3 fields)  should end with 106 rec x 13 rec = 1,378 recs
                                                         But stops and give above error at 35 sec.
                                                         Only 776 rec are created
    Only 2 fields to be filled . the 3rd is Auto-incremented
    -----------------------------
    It works perfectly with  t_member.dbf  = 70 and t_competiontype = 9
    
    
    Suggestions?
    How to increase sessions, if that is the problem?
    Is my code wrong, can it be improved? 
    
    
    Present Code:
    
    
    query.filter = ""
    query.order = ""
    dim tbl as P
    dim a_tbl as P
    dim b_tbl as P
    tbl = table.open("t_member.dbf")
    tbl.fetch_first()
    while .NOT. tbl.fetch_eof()
    
    
    pick1 = tbl.fnln
    pick2 = tbl.Photoclass
    
    
    query.filter = ".t."
    query.order = "recno()"
    
    
    a_tbl = table.open("t_comptypememb")
    
    
    b_tbl = table.open("t_competiontype")    ' this is line 22
    b_tbl.fetch_first()
    while .NOT. b_tbl.fetch_eof()
    	
    if b_tbl.uniqcomp="yes" then	
    a_tbl.enter_begin()
          if b_tbl.uniq = "yes" then 
    	     pick2 = b_tbl.defclass
    	      else
    	     pick2 = tbl.Photoclass
          end if	
    a_tbl.defclass=pick2
    a_tbl.COMPTNAME = b_tbl.Comptype
    a_tbl.MEMBER = pick1
    
    
    a_tbl.enter_end()
     end if
     
    b_tbl.fetch_next()
    
    
    end while   
    
    
    tbl.fetch_next()
       
    a_tbl.close()   
    
    
    end while    ' the member table
    tbl.close()
    Last edited by Al Buchholz; 01-14-2019 at 10:10 AM. Reason: added code tags

  2. #2
    Member
    Real Name
    Allen Klimeck
    Join Date
    Apr 2000
    Location
    Colorado
    Posts
    535

    Default Re: Error loading table: maximum session open tables exceeded

    Move line 22 outside of both whiles also move a_tbl.close()

    should probably move a_tbl = table.open("t_comptypememb") too

    don't see B_tbl close
    Last edited by Allen Klimeck; 01-12-2019 at 10:39 AM.

  3. #3
    Member MikeData's Avatar
    Real Name
    Mike Data
    Join Date
    Nov 2008
    Posts
    916

    Default Re: Error loading table: maximum session open tables exceeded

    Thanks for the response.
    I did move both table.open and it work perfectly.
    I also did add b_tbl close.
    Thanks again.

  4. #4
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,158

    Default Re: Error loading table: maximum session open tables exceeded

    OK I will say it.

    Mike,
    You have been on these boards for a very long time and your presenting code as you have without code formatting. Really!! For me to look at your issue I have to re-format the code you give which is not in a format a developer makes code, in order to make sense of the code you have written, in order to try and help you. You should frankly ashamed of yourself.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

Similar Threads

  1. Maximum session open tables exceeded
    By johnkoh in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 02-11-2011, 10:05 AM
  2. Error opening grid table/view: Maximum session: open tables exceeded
    By Rich Hartnett in forum Application Server Version 10 - Web/Browser Applications
    Replies: 9
    Last Post: 03-03-2010, 01:19 PM
  3. 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, 12:45 AM
  4. Alpha Error Codes: 1165 - Maximum session open tables exceeded
    By cjw423 in forum Alpha Five Version 7
    Replies: 3
    Last Post: 03-31-2009, 10:00 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, 03: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
  •