For Programmers: Free Programming Magazines  


Home > Archive > Clipper > November 2004 > R6001 runtime, magic number error - SOLVED









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 R6001 runtime, magic number error - SOLVED
Ross McKenzie

2004-11-29, 3:55 pm

This message was posted by Tibor Antal, but did not appear in
comp.lang.clipper, only in dBforums. I offered to paste it here for
him and he has agreed. Hope it is of interest.

Ross McKenzie

**********
Dear All :)

I just solved a main Clipper (and/or) Blinker problem.

Sympthom:

Clipper&Blinker hangs with strange errors, and gives You the infamous
black window with the almost useless datas - and the R6001 message.

The problem:

The Clipper index pointer miss the last record in the database if the
file is indexed, and You use fe. the go bottom command. The error
occures in different databases in different places, and different time
- but MOSTLY if You use special characters in the database/index file,
like chr(230).

The solution:

Simply replace the go bottom command with this lines:

function NEWgobottom()

if indexord()=0
go bottom
else
set softs on
s chr(255)
set softs off
endif

if eof() .and. lastrec()>0
skip -1
endif

return 1

And voila - the problem disappears :)

I hope it can solve a lot's of problems,
__________________
Tibor Antal
Budapest
Hungary

Ross McKenzie

2004-11-30, 8:55 pm

On Wed, 24 Nov 2004 23:27:50 GMT, klas.engwall@nospam.please (Klas
Engwall) wrote:

>Tibor,
>
>(if this gets back to dBforums)
>

Klas, the feed into dBforums is fine...the reverse is not true. Here
is Tibor's reply.

Regards,

Ross
***********
Quote:
Originally Posted by Klas Engwall
There seems to be one little thing missing: If there are in fact
special characters in the first position of the index key, and
chr(255) is one of those, and it appears in more than one record, then
the bottom record will never be reached unless one skips while !eof()
(and then skips -1 when eof() is reached).

BTW, does this apply to all RDDs or just one of them?



You are right, if somebody use the chr(255) then this one will not
work, it works only, if the chr(255) is not used (for the first
position).

I've tryed it with dbfcdx, and the default dbfntx - both had the same
problem, and disappeared this way. Therefore I don't know the reason -
only the solution :)

Re: Ross McKenzie

Thanks again for the post :)

Happy to help. Ross

__________________
Tibor Antal
Budapest
Hungary

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia

valusoft AT optushome DOT com DOT au

When there's a will, I want to be in it
Sponsored Links







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

Copyright 2008 codecomments.com