David Stone
2008-11-03 17:25:00 UTC
A seeker on a form has been working normally for years, but after
updating to a new version of a gov't database (same fields, same
indexes), I now get, when entering a "w" (no other letter before or
after "w" in the alphabet!) an "invalid subscript ref" error with a ref
to line 110 of the seeker control, which is this one:
lRet = this.seekRowset.findKeyNearest( this.normalizedValue() )
in the oSeek function below.
FUNCTION oSeek
local lRet
lRet = this.seekRowset.findKeyNearest( this.normalizedValue() )
if ( this.seekRowset.endOfSet )
this.seekRowset.next( -1 )
endif
RETURN lRet
If I click the Cancel button on the error box and then type a new first
letter other than "w" in the seeker (either before or after "w" in the
alphabet), the seeker works as expected, and after that successful seek,
starting a new seek with "w" then works as expected also. [sigh]
The field is a 200-char description indexed as
upper(left(DESCR,100))
and I have reindexed the table with no effect on the error, and also
reindexed as upper(left(DESCR,90)) with no effect.
The problem table is the form's rowset, and specifying the seeker's
rowset in the form's init has no effect. The index is set in the form's
dmd and is redundantly re-set in the init and the rowset topped at first().
Navigating in the rowset before using the seeker has no effect, and
doing a successful seek for another letter before seeking "w" has no
effect--as described above, a "w" seek is only successful if the error
has been generated and canceled.
Any idea which "subscript reference" is being referred to in the error
msg, or what might be going on to cause the error? I have never seen
this before despite using many seekers in many apps.
David
updating to a new version of a gov't database (same fields, same
indexes), I now get, when entering a "w" (no other letter before or
after "w" in the alphabet!) an "invalid subscript ref" error with a ref
to line 110 of the seeker control, which is this one:
lRet = this.seekRowset.findKeyNearest( this.normalizedValue() )
in the oSeek function below.
FUNCTION oSeek
local lRet
lRet = this.seekRowset.findKeyNearest( this.normalizedValue() )
if ( this.seekRowset.endOfSet )
this.seekRowset.next( -1 )
endif
RETURN lRet
If I click the Cancel button on the error box and then type a new first
letter other than "w" in the seeker (either before or after "w" in the
alphabet), the seeker works as expected, and after that successful seek,
starting a new seek with "w" then works as expected also. [sigh]
The field is a 200-char description indexed as
upper(left(DESCR,100))
and I have reindexed the table with no effect on the error, and also
reindexed as upper(left(DESCR,90)) with no effect.
The problem table is the form's rowset, and specifying the seeker's
rowset in the form's init has no effect. The index is set in the form's
dmd and is redundantly re-set in the init and the rowset topped at first().
Navigating in the rowset before using the seeker has no effect, and
doing a successful seek for another letter before seeking "w" has no
effect--as described above, a "w" seek is only successful if the error
has been generated and canceled.
Any idea which "subscript reference" is being referred to in the error
msg, or what might be going on to cause the error? I have never seen
this before despite using many seekers in many apps.
David