Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird error 1494
Message
De
15/06/2002 22:33:33
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/04/2002 23:26:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00642461
Message ID:
00668974
Vues:
14
>I've had this error happening for several reasons, or at least so it seemed.
>
>When I removed one of the obvious, it started reappearing for some other reasons. Here's the scenario:
>
>I'm importing data from textfiles or Excel sheets into a temp cursor, then using bizobjects to stuff the fields (properly formatted and checked) into the views, which then get updated for each record. After the save, I had one requery of the main view, which is actually a complicated flat view with several joins into lookups. This requery often failed, with the error 1494 ("View definition has changed").

The culprit was one field, selected as

nvl(nWeight, 0000) as nWeight

The problem was that the field was n(3), not n(4) in the underlying table. Now if I started with a zapped table, it would have a null there, and therefore the right part of the nvl() would kick in and create a record with n(4) zero value. As soon as I started adding values, they would be getting into this view, tableupdate()ing just fine, but the next requery() would return these records in the underlying table's format, which was n(3) and the view definition changed by one byte. And it banged with 1494.

The solution would be to define the field in select as

nvl(nWeight, 0)+0000 as nWeight

so it would be n(4) regardless of the format in the underlying table; however, three zeros (exactly as much as needed) would be even better.

Live and learn.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform