Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'View definition has been changed' - HOW???
Message
De
21/05/1997 15:35:16
 
 
À
21/05/1997 12:50:19
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00032980
Message ID:
00033161
Vues:
42
WOW, Elyse - who would ever have guessed!!!

I'll file that one for sure.

Cheers,
Jim N

>>One of the subtle things that is happening is that the requery is reissuing the query select statement creating a NEW cursor that is almost like the previous but not quite. By this I mean that the grid is bound to the first query data not by name (although it appears that way) but by an internal file handle. The requery that re-executes the select statement creates a NEW cursor with a new internal file handle and deletes the old one. Your grid is now bound to something that does not exist!
>>
>>There are two ways around this. Just before the requery say grid.recordsource = SPACE(1). do the requery and then set the record source back to the cursor name.
>>The other method is to create a view of the data you want (using a parameter if you need to limit the data returned.) Set the grid recordsource to the view. The requery of the view does not issue a new select statement (at least not in a way that changes the internal handle)
>>
>>Bob
>
>After much work, I found the problem. One of the fields in the SQL used the DTOC() function. The problem arose when the view was opened with CENTURY set OFF and then REQUERY() with CENTURY set ON (or vice versa). Since the length of the field changed (and hence the structure of the view), I got the message about the view definition having been changed. The solution is to PADR() the expression so it is always a constant length. Thanks anyway...
>
>Elyse
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform