Alpha Video Training
Results 1 to 6 of 6

Thread: Max number of indexes attached. What the?

  1. #1
    Member
    Real Name
    Phil DeGruy
    Join Date
    May 2003
    Posts
    264

    Default Max number of indexes attached. What the?

    Ok, have a query by form. while making a series of different queries I came upon this error:
    Maximum number of indexes attached.

    Why are the query indexes not being cleared.

    This also happens on a different find form with a multi-state button setup (all the scripts except the ones dealing with address) that was lifted from the alpha sports customer form.

    Only way out is to manually delete the queries from the list or close the form.

    Latest version of patch, but I think it happened on a couple back also.

    Phil DeGruy

  2. #2
    Member
    Real Name
    Doug Chanley
    Join Date
    Apr 2000
    Posts
    563

    Default RE: Max number of indexes attached. What the?

    Hi Phil....

    I am not sure if you need all of the indexes attached to the table but you might look at....

    .DROP() .QUERY_DETACH_ALL()

    hope this helps....

    doug

  3. #3
    "Certified" Alphaholic Melvin Davidson's Avatar
    Real Name
    Melvin Davidson
    Join Date
    Apr 2000
    Location
    Parker, CO
    Posts
    1,197

    Default RE: Max number of indexes attached. What the?

    I believe the answer comes from the original specifications found in v4.5

    ie: Number of indexes per table 40

    If you create a query, it remains unless you specifically delete it. A query is a form of index.

  4. #4
    Member
    Real Name
    Phil DeGruy
    Join Date
    May 2003
    Posts
    264

    Default RE: Max number of indexes attached. What the?

    I guess I was under the impression that alpha removed the oldest query from the list if the max queries was reached. That is according to: About indexes, queries,and ranges in the xbasic .chm reference.
    Quote:
    "There are a maximum of 4 queries per table and 16 queries per database at any time. New queries take up one of the four slot positions, pushing one of the older queries off the list of open query lists."

    I also do not know where the following code came from (and I built the form from scratch) as I did not write it and I thought I had used action scripting to "clear" (query by form clear) the query but I guess it only removed the stuff in the fields.

    Code:
    Mode = parent.mode_get()
    
    SELECT
    	
    	CASE mode = "VIEW"
    		
    		'Query by Form in current form.
    		topparent.Query_By_Form()
    		
    		'Clears Query by Form criteria in current form.
    		topparent.Query_Clear()
    		topparent.index_set("")
    	
    	CASE mode = "QUERY"
    		
    		'Clears Query by Form criteria in current form.
    		topparent.Query_Clear()
    		topparent.index_set("")
    		
    END SELECT

    I will add a tbl.query_detach_all() to the above and to the other forms multi-state button or wherever I might need to put it. I'll have to look at things first.

    Thanks for the help guys.

    Phil DeGruy

  5. #5
    Member
    Real Name
    Dave Parkins
    Join Date
    Dec 2002
    Location
    Glen Haven, WI
    Posts
    289

    Default RE: Max number of indexes attached. What the?

    Phil,
    I had the same problem so I wrote this little script and attached it to a button. It works well.

    tbl = table.current()
    tbl.query_detach_all()

    Dave

  6. #6
    Member
    Real Name
    Phil DeGruy
    Join Date
    May 2003
    Posts
    264

    Default RE: Max number of indexes attached. What the?

    Dave,

    That was exactly what I did. I added the lines to the clear query button.

    Thanks,

    Phil DeGruy

Similar Threads

  1. maximum number of indexes
    By Lynda Huddleston in forum Alpha Five Version 5
    Replies: 6
    Last Post: 08-09-2005, 06:04 PM
  2. Maximum number of actions attached to button ??
    By mronck in forum Alpha Five Version 5
    Replies: 10
    Last Post: 11-19-2004, 12:04 AM
  3. Maximum indexes attached error
    By crimmelcp in forum Alpha Five Version 6
    Replies: 3
    Last Post: 11-15-2004, 05:55 AM
  4. Maximum number of indexes attached
    By Fred M. Pfeiffer in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-13-2004, 04:21 PM
  5. maximum number of indexes attached
    By Angie Boutin in forum Alpha Five Version 5
    Replies: 4
    Last Post: 06-23-2003, 09:11 AM

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
  •