Home > Archive > Getting Started with dBASE > November 2006 > Now I tell you why









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Now I tell you why
dlit

2006-11-23, 7:13 pm

Now I tell you why the bit of routine I posted under title "unusual error" is not working.

The code of this routine is perfectly good as working so fine under DBIV for years but it makes conspicuous the bug of the LOCATE command that I already noticed in other prg and for which I had already submitted a claim at the bug report without any reply
Ivar B. Jessen

2006-11-24, 12:14 am

On Thu, 23 Nov 2006 09:58:45 -0500, in dbase.getting-started,
Subject: Now I tell you why,
Message-ID: <704tf$wDHHA.1140@news-server>,
dlit <dlitl@wanadoo.fr> wrote:

>Now I tell you why the bit of routine I posted under title "unusual error" is not working.
>
>The code of this routine is perfectly good as working so fine under DBIV for years but it makes conspicuous the bug of the LOCATE command that I already noticed in other prg and for which I had already submitted a claim at the bug report without any repl

y.

Maybe not a LOCATE issue. Try to reinitialize RSM as indicated below and the code will run.
>
>I also display the code in the following lines :
>//TESTB
>SELECT B
>USE TESTB
>GO TOP

RSM = 0 // <---
>DO WHILE .NOT. EOF()
>*? noliv,semret
>*wait

release RMS // <---
>RSM=SEMRET
>MIL=ANNEE



>Will dbase at last make the necessary correction on this so much used command ?
>
>If anyone is interested to check it for himself, he can just load the prg and its dbf I posted together under my first message titled "unusual error"
>
>If anyone has a comment or a suggestion to get tound the bug, he s welcome



Ivar B. Jessen
Ivar B. Jessen

2006-11-24, 12:14 am

On Thu, 23 Nov 2006 21:28:50 +0100, in dbase.getting-started,
Subject: Re: Now I tell you why,
Message-ID: < 031cm2p86v7epb54h4dm
o4c5l0sohusp5c@4ax.com>,
Ivar B. Jessen <bergishagen@it.notthis.dk> wrote:
[color=darkred]
>RSM = 0 // <---
release RMS // <--- Correction, should be release RSM <sigh>[color=darkred]


Ivar B. Jessen
dlit

2006-11-24, 7:13 pm

Thank you very much for this advice.

However if I replace the "do something" part of the code with something not using LOCATE command, the code will work as it is. And the question remains of the reason why releasing the variable is necessary after the first execution of the code containing
the LOCATE command.

This is not the first time I mention a bug about LOCATE command which for some unknown reason puts the trouble somewhere.
I had to find some turn arounds to use it safely but I still make the difference with DBIV.

On the other hand some other commands such as "INSERT BLANK" work better under DB+ rather than DBIV.

However, in DB+, this command is completely baffled when used together with LOCATE somewhere in the code before.

Due to the common use of this command I think that dbase should have a thorough look into it and I posted a claim in the Bug Report.

Anyway thanks again for help
Dom

Ivar B. Jessen Wrote:

> On Thu, 23 Nov 2006 21:28:50 +0100, in dbase.getting-started,
> Subject: Re: Now I tell you why,
> Message-ID: < 031cm2p86v7epb54h4dm
o4c5l0sohusp5c@4ax.com>,
> Ivar B. Jessen <bergishagen@it.notthis.dk> wrote:
>
> release RMS // <--- Correction, should be release RSM <sigh>
>
>
> Ivar B. Jessen


Ivar B. Jessen

2006-11-24, 7:13 pm

On Fri, 24 Nov 2006 10:10:57 -0500, in dbase.getting-started,
Subject: Re: Now I tell you why,
Message-ID: <GN6b#q9DHHA.1420@news-server>,
dlit <dlitl@wanadoo.fr> wrote:

>Thank you very much for this advice.


You are welcome.


Ivar B. Jessen
Ivar B. Jessen

2006-11-25, 5:12 am

On Fri, 24 Nov 2006 10:10:57 -0500, in dbase.getting-started,
Subject: Re: Now I tell you why,
Message-ID: <GN6b#q9DHHA.1420@news-server>,
dlit <dlitl@wanadoo.fr> wrote:

>Thank you very much for this advice.
>
>However if I replace the "do something" part of the code with something not using LOCATE command, the code will work as it is. And the question remains of the reason why releasing the variable is necessary after the first execution of the code containing

the LOCATE command.

After experimenting a little more I believe the reason is explained in the OLH on LOCATE:

"To select a table that is already open, its alias name is preferred over the work area number,
because tables may be opened in different work areas depending on conditions. The alias name will
always select the right table (or cause an error if the table is not opened), *while the work area
number may take you to the wrong table*."

What happens is probably that your code is using the wrong table. Modify it as follows:

Replace all lines containing the word LOCATE from
LOCATE FOR SEM=.....

to

LOCATE FOR CAL06->SEM=

and the code will work without error :-)


To make the code easier to understand replace also

RSM=SEMRET

with

RSM=TESTB->SEMRET


Ivar B. Jessen
dlit

2006-11-29, 7:13 pm

This is a fine tuning of the problem. Thanks for your interest. I ll check whether this solves the problems I already "located" in other programs.
Dom

Ivar B. Jessen Wrote:

> On Fri, 24 Nov 2006 10:10:57 -0500, in dbase.getting-started,
> Subject: Re: Now I tell you why,
> Message-ID: <GN6b#q9DHHA.1420@news-server>,
> dlit <dlitl@wanadoo.fr> wrote:
>
ng the LOCATE command.[color=darkred]
>
> After experimenting a little more I believe the reason is explained in the OLH on LOCATE:
>
> "To select a table that is already open, its alias name is preferred over the work area number,
> because tables may be opened in different work areas depending on conditions. The alias name will
> always select the right table (or cause an error if the table is not opened), *while the work area
> number may take you to the wrong table*."
>
> What happens is probably that your code is using the wrong table. Modify it as follows:
>
> Replace all lines containing the word LOCATE from
> LOCATE FOR SEM=.....
>
> to
>
> LOCATE FOR CAL06->SEM=
>
> and the code will work without error :-)
>
>
> To make the code easier to understand replace also
>
> RSM=SEMRET
>
> with
>
> RSM=TESTB->SEMRET
>
>
> Ivar B. Jessen


Ivar B. Jessen

2006-11-29, 7:13 pm

On Wed, 29 Nov 2006 08:53:00 -0500, in dbase.getting-started,
Subject: Re: Now I tell you why,
Message-ID: <iiPgu27EHHA.1140@news-server>,
dlit <dlitl@wanadoo.fr> wrote:

>This is a fine tuning of the problem. Thanks for your interest. I ll check whether this solves the problems I already "located" in other programs.


I hope it is the solution of the problem ;-)


Ivar B. Jessen
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com