Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird error 1494
Message
From
15/06/2002 22:33:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
08/04/2002 23:26:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00642461
Message ID:
00668974
Views:
13
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform