Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Record is out of range' when grid scrolls on data entry?
Message
De
03/12/1997 00:31:28
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
'Record is out of range' when grid scrolls on data entry?
Divers
Thread ID:
00063508
Message ID:
00063508
Vues:
104
After more than a month of tesing and debugging, I am back to the same bug and I am going mad. Can someone help to overcome this bug?

I have a grid (in optimistic table buffering) that gives me the error 'Record is out of range' when the grid starts scrolling on data entry. For example, there are 5 rows shown on the grid and when I enter the sixth record, the error comes out. This error appears from a code where I store and restore the record number. The following is the code.

LOCAL i,lnOldArea, ;
lnOldRecNo, ;
luKey, ;
lcOrder,;
lnResult,;
lcExpression

lnResult = 0.00
IF EMPTY(THIS.CalExpr)
return lnResult
ELSE
IF EMPTY(this.RecordSource)
RETURN lnResult
ENDIF

lcExpression= " " + THIS.CalExpr + " "
lnOldArea = SELECT()
SELECT (this.RecordSource)
lnOldRecNo = IIF(EOF(), 0, RECNO())

IF lnOldRecNo <> 0
GO lnOldRecNo
ENDIF
SELECT (lnOldArea)
ENDIF

return lnResult
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform