Alpha Video Training
Results 1 to 10 of 10

Thread: Error message: Maximum number of indexes exceeded?

  1. #1
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default Error message: Maximum number of indexes exceeded?

    I have a form based on a table. The user enters data into fields on the form, and then clicks the save button. This works fine. However, when entering many records one after the other, I get this error message: "Max number of indexes exceeded", and I have no way out other than to exit the program and restart it. Doe s anyone know what causes this and how to avoid this error?

    Gary

  2. #2
    Jim Rowlen
    Guest

    Default RE: Error message: Maximum number of indexes excee

    Never got that one, and we've had a ton of indexes.

    Does your data entry process, or records search, or some form of user interaction, generate a lot of queries which might not be getting erased?

  3. #3
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Error message: Maximum number of indexes excee

    Hi Jim:

    Thanks for your prompt response. I believe that the answer to your question is no. I do not think I am generating a lot of indexes. But maybe I am missing something. This is the script that is attached to a save button:

    dim ttest as n
    ttest=0
    dim tempidn as c
    tempidn=idnumber.value
    dim global anum as n
    dim global fname as c
    fname=fullname_new.value

    if time_new.value=""
    ui_msg_box("You must indicate the time of the appointment","")
    time_new.activate()
    ttest=1
    end if
    if fullname.value="" .and. ttest=0
    ui_msg_box("You cannot leave the Patient field blank","")
    fullname_new.activate()
    ttest=1
    end if
    if svcode_new.value="" .and. ttest=0
    ui_msg_box("You cannot leave the SVCODE field blank","")
    svcode_new.activate()
    ttest=1
    end if

    if ttest=0

    dim tblt as p
    tblt=table.open("authorizations")
    query.filter="idnumber=tempidn"
    query.order=""
    query.options=""
    tblt.query_create()
    dim tn as n
    tn=0
    while .not. tblt.fetch_eof()
    tn=tn+1
    tblt.fetch_next()
    end while
    tblt.close()
    if tn>0

    dim ch as n
    dim deltit as c
    dim code as n
    code=UI_YES_NO
    deltit="Apply to an authorization?"
    ch=ui_msg_box(deltit,"",code)
    if ch=ui_no_selected then
    anum=0
    else if ch=ui_yes_selected then

    script_play("ChangeAuthBtn")
    'dim global anum as n
    tempauthno_new.value=anum
    if tempauthno_new.value=0
    svcode_new.activate()
    anum=0
    end
    end if
    end if
    end if

    ui_freeze(.t.)

    dim ttime as c
    dim tname as c
    dim tsvcode as c
    dim tfee as n
    dim tunits as n
    dim ti1exp as n
    dim ti2exp as n
    dim tptexp as n
    dim tprovfee as n
    dim tt as c
    dim tl as c
    dim tdxcode as c
    dim tmod as c
    dim tnotes as c
    dim tdate as d
    dim tprov as c
    dim tempidn as c
    dim global showdate as d
    dim global showprov as c
    ttime=time_new.value
    tname=fullname_new.value
    tsvcode=svcode_new.value
    tfee=fee_new.value
    tunits=units_new.value
    ti1exp=i1exp_new.value
    ti2exp=i2exp_new.value
    tptexp=ptexp_new.value
    tprovfee=provfee_new.value
    tt=t_new.value
    tl=l_new.value
    tdxcode=dxcode_new.value
    tmod=mod_new.value
    tnotes=notes_new.value
    tdate=showdate
    tprov=showprov
    tempidn=idnumber_new.value

    parent.cancel()
    parent.commit()

    dim tbl as p
    tbl=table.get("appointments")
    tbl.enter_begin()
    tbl.authno=anum
    tbl.tempauthno=anum
    tbl.time=ttime
    tbl.fullname=tname
    tbl.svcode=tsvcode
    tbl.fee=tfee
    tbl.units=tunits
    tbl.i1exp=ti1exp
    tbl.i2exp=ti2exp
    tbl.ptexp=tptexp
    tbl.provfee=tprovfee
    tbl.t=tt
    tbl.l=tl
    tbl.dxcode=tdxcode
    tbl.mod=tmod
    tbl.notes=tnotes
    tbl.date=tdate
    tbl.prov=tprov
    tbl.idnumber=tempidn
    tbl.appt="Y"
    tbl.charge="N"
    tbl.enter_end()
    dim cnum as n
    cnum=tbl.chargeno

    dim tblp as p
    tblp=table.open("patients")
    query.filter="idnumber=tempidn"
    query.order=""
    query.options=""
    tblp.query_create()
    tblp.change_begin()
    tblp.status="Active"
    tblp.change_end()
    topparent.resynch()
    tblp.close()

    query.filter="date=tdate .and. prov=tprov .and. appt='Y'"
    query.order="STR(TIMESORT,8,0)+SVCODE+FULLNAME"
    query.options=""
    tbl.query_create()

    browse1.enable()
    browse1.refresh()
    browse1.fetch_first()

    dim shared tempanum as n
    tempanum=tempauthno_new.value

    if tn>0
    if ch=ui_yes_selected
    script_play("AuthCountDownEdit")
    end if
    end if

    script_play("ApptBtnsShow")

    condtest=3
    cond1.refresh()

    ui_freeze(.f.)

    while cnumbrowse1:chargeno.value
    browse1.fetch_next()
    end while

    anum=0
    fname=""

    browse1.activate()

    end if

    end

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Error message: Maximum number of indexes excee

    Gary, I'm not sure if this is the cause of your problem, but I find it odd that your validation routines at the top of your script do not stop the script when you return to the data entry form. It seems to me that your script keeps running, after you activate the field that is missing required data. What happens next, when the user presses the save button again after supplying the missing data? You might have two copies of the script running simultaneously. Wouldn't it be better to *end* the script if required fields are empty?

    -- tom

  5. #5
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Error message: Maximum number of indexes excee

    Tom:

    I will try what you are saying.But I believe that the script as is does end when the required field is not filled. Notice that when the "field rule" is violated it sets ttest to 1 and that the remiander of the script only runs if ttest=0. I believe that this is equivalent to what you are saying. But I may be wrong and will definitely try your suggestion. Thanks!

    Gary

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Error message: Maximum number of indexes excee

    Perhaps so, it's virtually impossible to trace on line, since everything is left justified.

    -- tom

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Error message: Maximum number of indexes excee

    Gary, you might want to review the external scripts which get 'played' by this one, to see if other queries are being run there which remain active.

    Also, you might want to freeze the interface until the script runs its course. Depending on the sizes of these tables, and the speed of your network, your operator may be saving the next record before the current one is finished.

    For example, the statements in your script which refresh or resynch the current form could be delayed to the end of the script. Or, even better, the save button could be disabled until the script concludes...

    -- tom

  8. #8
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Error message: Maximum number of indexes excee

    Tom:

    These are all good suggestions, and I will try them. Thanks.

    Gary

  9. #9
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,805

    Default RE: Error message: Maximum number of indexes excee

    Gary:

    I've had that (or a similar error) in scripts which run queries repetitively. Unless, that is, you drop the query when yuo are done with it since Alpha will only store X # of active queries. Perhaps Alpha is counting the queries as you continue with data entry in a given session.

    I'd try changing the query action line to

    idx=tbl.query_create()

    and add an

    idx.drop()

    when you no longer need the query. The idx.drop must come before the tbl.close() line.

    Finian

  10. #10
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Error message: Maximum number of indexes excee

    Finian:

    Once again, thanks! This is absolutely the source of my problem.

    Have a great day ...

    Gary

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 indexes attached error
    By crimmelcp in forum Alpha Five Version 6
    Replies: 3
    Last Post: 11-15-2004, 05:55 AM
  3. 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
  4. maximum number of indexes attached
    By Angie Boutin in forum Alpha Five Version 5
    Replies: 4
    Last Post: 06-23-2003, 09:11 AM
  5. Maximum number of indexes
    By Gil Smith in forum Alpha Five Version 4
    Replies: 2
    Last Post: 07-12-2001, 01:03 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
  •