Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 5 - Set Relation
Message
From
25/03/2000 15:11:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Error 5 - Set Relation
Miscellaneous
Thread ID:
00350426
Message ID:
00350426
Views:
45
Hi All:

I developed a class bassed in a Form class, for my Exe. It's a normal form and in the method refresh() I type the next code:

*SAVE the recno() of the FIRST and LAST record of the table for
*enabled or disabled the NEXT and BEFORE buttons
*Mantenimiento.refresh()
IF used(this.cTabladefecto)
LOCAL nEmpiezo, cDefAlias
cDefAlias=this.cTabladefecto
SELE (cDefAlias) &&Select the table of the form.
nEmpiezo=recno(cDefAlias) &&recno() now
GO BOTTOM IN (cDefAlias)
this.nLastRecord=recno(cDefAlias)
GO TOP IN (cDefAlias)
this.nFirstRecord=recno(cDefAlias)
IF nEmpiezo<=reccount(cDefAlias)
GO nEmpiezo IN (cDefAlias)
ELSE &&If aren't any record that deleted()=.F.
GO TOP
ENDIF
ENDIF

This application run in VFP 5.0 in a shared server, and the tables is free tables, aren't in any Database.

The form have a Principal Tables, and other tables are opened too and relationshiped with the Principal Table of the form. In this Case are 10 more tables relationshiped with the Principal Table of th Form.

I don't know why, but sometimes, when a user select a record, (Ej. The invoice XXXXX), apper the next Error: (My rutine error shows the next data that I have recopiled)

Error 5 - The record it's out of the interval (I work with the spanish version)

Program error: MANTENIMIENTO.REFRESH
LINE NUMBER: 12
LINE CODE: SET RELATION TO Num_Parte INTO 14 ADDITIVE.
Alias(): Parte.dbf
Recno(): 1
Reccount(): 2560

And sometimes ... after appear the Error 114: The index not correspond to the table. Delete the index file and create again (I'm translating, i'm using VFP spanish version)

My suprise was big, when I read the LINE CODE of the Error:
SET RELATION TO Num_Parte INTO 14 ADDITIVE. I never have write that line. In the form.init() I have type the relation of the code, totally I open 16 tables, 10 relationshipped with the Principal Table of the Form. I have type this lines in the form INVOICE who has bassed over the class MANTENIMIENTO:
....INVOICE.init()...
....
SET REALTION TO cod_User INTO User ADDITIVE
SET RELATION TO Num_Parte INTO Linea_pa ADDITIVE
SET RELATION TO Num_Parte INTO Titulos ADDITIVE
SET RELATION TO Num_Parte INTO S_Librar ADDITIVE
SET RELATION TO Num_Parte INTO Partetec ADDITIVE
SET RELATION TO Num_Parte INTO L_pa_oad ADDITIVE
...

The line 12 of Mantenimiento.refresh() should be:
GO nEmpiezo IN (cDefAlias)
and NOT ....
SET RELATION TO Num_Parte INTO 14 ADDITIVE.

I suppose that VFP make the line SET RELATION TO Num_Parte INTO 14 ADDITIVE. The number area 14 it's the area for the table L_pa_oad.

It's the problem the number of tables relationshipped?

In the form a have Object Page, and Grid that shows the record of the tables relationshipped.

It's a bug?

Why Can I do for resolve the problem?

Thanks in advance. Any ideas will be good, I'm getting crazy....

Fernando Molina
Next
Reply
Map
View

Click here to load this message in the networking platform