Subject Re: requery problem (semi reason)
From Charlie <>
Date Sat, 11 Jan 2020 06:32:03 -0500
Newsgroups dbase.getting-started

It is now fixed.  It was an indexing problem.  I am now able to requery with no problems.  Thanks for the help!!!

Akshat Kapoor Wrote:

> On 11.01.2020 04:27, Charlie wrote:
> > I think it is an indexing problem now.  The new form seems to work much better with most of the queries not having an index.  Does this make any sense?  I've never worked with this many queries...
> Good Afternoon Charlie,
> Went through the replies of Mervyn,
> He has spent some time on this.
> And I cannot match his generous offer of uploading the files to dropbox.
> All I can suggest is take your current form in the position it is in.
> Run it few times and narrow down on which function it hangs. If you
> doubt it is due to string of requery() then place msgbox() at different
> intervals to know upto which requery() is the code functioning properly.
> A lot of msgbox() does at times make the code tedious to run. But since
> dBase shuts down so ? is useless in this case.
> The only other alternative is to use logging.
> I developed the following function for this precise reason
>     function tr_err()
>        parameters c_sql
>        local f_tr_log , fname , n
>        f_tr_log = new file()
>        fname = "trlr"+dtos(date())+".log"
>        if f_tr_log.exists(fname)
> ,"A")
>        else
>           f_tr_log.create(fname,"A")
>        endif
>        n = new number()
>        n = new date().gettime()
>        f_tr_log.writeln(dtoc(date())+" "+time()+" " + c_sql)
>        f_tr_log.close()
>        return
> In place of msgbox() you can use tr_err("Location 1 okay") ,
> tr_err("Location 2 okay") and so on. If you want values of some
> variables (I usually opt for this) then add them to the string parameter
> tr_err("Location 1 A="+str(A,6,2) + " B="+B)
> It will create a different log file for each date.
> Once dBase crashes you can open the log file in text editor and view the
> results.
> It would also help you in checking which portion of code is taking more
> time.
> Regards
> Akshat