Groups > dBase > dBase reports > Re: Report error, invalid subscript reference




Report error, invalid subscript reference

Report error, invalid subscript reference
Wed, 12 Dec 2007 18:50:16 +010
Running a report on a new PC is generating "invalid subscript
reference"
error
However I can't find where this is coming from.

When the same program is running on an older PC there is no problem, it
works perfect.
If I keep the database on the new PC and connect to the database over the
network
from an older PC running the program on the older PC it works fine too.

I pushed the button debug when the first stop comes and the code looks as
bellow,
(It stops at  line "this.text =
this.form.datamodref1.ref.TableC.rowset.fields["period_currency_IB"].v
alue"
bellow)


function TEXT4_canRender
Local nText1
nText1 = True
IF
this.form.datamodref1.ref.TableA.rowset.fields["date_start"].value=;
this.form.datamodref2.ref.TableB.rowset.fields["year_start"].value
nText1 = False
ENDIF
this.text =
this.form.datamodref1.ref.TableC.rowset.fields["period_currency_IB"].v
alue
return nText1

The Table C has the column "period_currency_IB" and
"period_IB" . When
stopped here I checked
"Watch" in the Debugger, "period_IB" shows correct value
but
"period_currency_IB" shows "invalid subscript reference"

If I look in TableC in parallel through another session the value in both
fields are ok and also the field names are correct.
Is there any explanation for this, is there anywhere the reason for this can
be found ?

The dBase version is Dbase Plus 2.5 b1804
Op.syst. is Win2000 Sp4 on all PC:s

Any idea's ?
Regards
Leif

Post Reply
Re: Report error, invalid subscript reference
Wed, 12 Dec 2007 20:46:29 -080
Leif wrote:
> Running a report on a new PC is generating "invalid subscript
reference"
> error
> However I can't find where this is coming from.
> 
> When the same program is running on an older PC there is no problem, it
> works perfect.
> If I keep the database on the new PC and connect to the database over the
> network
> from an older PC running the program on the older PC it works fine too.
> 
> I pushed the button debug when the first stop comes and the code looks as
> bellow,
> (It stops at  line "this.text =
>
this.form.datamodref1.ref.TableC.rowset.fields["period_currency_IB"].v
alue"
> bellow)
> 
> 
> function TEXT4_canRender
> Local nText1
> nText1 = True
> IF
this.form.datamodref1.ref.TableA.rowset.fields["date_start"].value=;
>
this.form.datamodref2.ref.TableB.rowset.fields["year_start"].value
> nText1 = False
> ENDIF
> this.text =
>
this.form.datamodref1.ref.TableC.rowset.fields["period_currency_IB"].v
alue
> return nText1
> 
> The Table C has the column "period_currency_IB" and
"period_IB" . When
> stopped here I checked
> "Watch" in the Debugger, "period_IB" shows correct
value but
> "period_currency_IB" shows "invalid subscript
reference"
> 
> If I look in TableC in parallel through another session the value in both
> fields are ok and also the field names are correct.
> Is there any explanation for this, is there anywhere the reason for this
can
> be found ?
> 
> The dBase version is Dbase Plus 2.5 b1804
> Op.syst. is Win2000 Sp4 on all PC:s
> 
> Any idea's ?

Typically this error means you are referencing a field that does not 
exist ... the "subscript reference" is the fieldname for the fields 
array of the rowset object ... perhaps you have an older version of a 
table somewhere that needs to be updated?

Ken

-- 
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
Post Reply
Re: Report error, invalid subscript reference
Thu, 13 Dec 2007 05:48:29 -080
Leif wrote:
> I can't find any invalid subscript references / field name in
> any tables. I have tested this on 3 different computers , using the same
> software and the same database (same tables). It works fine on
> two of them. Both of the computers which doing fine are old.
> On the new computer it just does not work. Something is hidden here
> which I can't find/don't understand.
> 
> The Op.syst. is the same on all computers.
> 
> All forms are working fine, it's only the report that fails.
> 
> When the error message shows up I choose debug,
> in the Debugger Watch window I can find the field "period_IB"
showing
> correct value but the field "period_currency_IB" shows
"invalid subscript
> reference".
> (If you can trust the Debugger)
> Both are correct field names in the same table.
> 
> The report work fine on the older computers  At the moment I'm lost.
> I don't know how to find the source for this error. How to trace it ?
> I can single step throug the report in the debugger but as soon as you get
> to "Render()" it's lost so there is no help there.

Unfortunately the render() method does sort of end up as a catchall for 
errors. I don't know what to tell you ... I just explained the usual 
reason for the error, but I can't help you find the problem ...

Ken

-- 
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
Post Reply
Re: Report error, invalid subscript reference
Thu, 13 Dec 2007 05:58:14 -080
Leif wrote:
> Can it be that the dBase report software does work with PC100 memories but
> not with DDR2 DIMM memories ?

Um, I don't see how that could be the case. Once Windows is done 
loading, memory is memory is memory ... it's highly unlikely this is the 
case.

Ken

-- 
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
Post Reply
Re: Report error, invalid subscript reference
Thu, 13 Dec 2007 06:46:39 -080
This is kinda way-out, but put your table in another directory and run the 
report - see if you still get that error.  If you don't, then you might have 
a glitch on your HD.  Just a suggestion.

bigMike




"Ken Mayer [dBVIPS]" <dbase@_nospam_goldenstag.net> wrote in
message 
news:AHywALZPIHA.1648@news-server...
> Leif wrote:
>> Can it be that the dBase report software does work with PC100 memories

>> but
>> not with DDR2 DIMM memories ?
>
> Um, I don't see how that could be the case. Once Windows is done loading, 
> memory is memory is memory ... it's highly unlikely this is the case.
>
> Ken
>
> -- 
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase/dBASEBooks.htm
> http://www.goldenstag.net/dbase 

Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact