Alpha DevCon 2018
Results 1 to 3 of 3

Thread: query difficulty

  1. #1
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,894

    Default query difficulty

    I have 3 scripts - each of which first does a summary operation, then appends the summary records to another file. At that point I create a query on a completely different file, and based on that query do things with the records in the summary file.

    The problem is that I get the "cannot find field" error when trying to create the query, at the 2nd script. I have added scripts to check for open files, pack the file, etc., but to no avail.

    If I close the program, and then run the 2nd and/or 3rd script, it works. But I can only run one at a time without closing the program and reopening. Obviously, something is left somewhere. But is isn't an open file.

    the code is like this:
    bell=table.open("bell customers")
    query.filter="Status='Supplies Only'"
    idx=bell.query_create()

    if I put:

    bell=table.open("bell customers")
    ui_msg_box("","" + bell.status"
    query.filter="Status='Supplies Only'"
    idx=bell.query_create()

    it sees the "status" field - but the query_create can't find it.

    any ideas?

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

    Default RE: query difficulty

    Martin:

    The only thing I can think of is that one of the query global variables is confusing the second script query.

    Try setting
    query.description=""
    query.order=""
    query.options=""
    at the start of each script. Maybe a query.order in another script is causing the problem.

    Finian

  3. #3
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,894

    Default RE: query difficulty

    Finnian - thank's a million - that was it!!!!!!!!!!

Similar Threads

  1. Difficulty using import genie
    By Bill Griffin in forum Alpha Five Version 5
    Replies: 3
    Last Post: 04-02-2003, 11:35 AM
  2. import difficulty
    By martinwcole in forum Alpha Five Version 5
    Replies: 6
    Last Post: 01-08-2003, 04:51 AM
  3. Look up difficulty
    By BDennis in forum Alpha Five Version 4
    Replies: 4
    Last Post: 12-16-2002, 07:39 AM
  4. Difficulty of Alpha Four?
    By Desmond Birch in forum Alpha Four Versions 7 and 8
    Replies: 8
    Last Post: 08-01-2002, 11:59 AM
  5. query difficulty
    By martinwcole in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-14-2000, 03:11 PM

Posting Permissions

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