Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local view returning syntax error
Message
From
04/08/1998 06:59:12
 
 
To
04/08/1998 06:53:10
Mark Denby
Bradford Metropolitan Council
Bradford, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00123564
Message ID:
00123732
Views:
15
Mark,

You have indeed found the problem - others have reported the same problem here, with the same fieldname of DESC.

DESC *is* a VFP keyword. That seems to be the root of this problem. Similar problems have also been reported when other VFP keywords have been used. The workaround is as you have done - change the field name to non-keyword.
This is a tougher problem for those who have old files with this keyword, with many other program successfully using the field correctly.

Cheers

Jim N

>I've managed to sort out what the problem was, But I need someone to confirm this as it appears to be a bug in the updating of local views.
>
>My original table defination looked like this
>
>divlink char(10)
>seclink char(10)
>desc char(40)
>
>It seems to be the desc field that is causing the syntax error. If I rename the field from desc to sectdesc it all works as expected.
>
>Can someone set up a table as above, the data would look something like this:-
>
>divlink seclink desc
>0000000001 0000000001 John Smith
>0000000001 0000000002 Fred Bloggs
>0000000002 0000000003 Arthur Brown
>
>create a view that look like this:-
>
>SELECT *;
> FROM tablename
> WHERE divlink = "0000000001"
>
>Set up the seclink as the keyfield and Update Using to be update, the other two fields are flagged as updateable.
>
>When it retreives the records change the desc and move onto the next record you should receive a 'Syntax Error'.
>
>Ensure that all the tables are closed and reverted
>
>Now change the structure of the table so that the desc field is now named sectdesc and modify the view to pick up the table changes. Run the view and change the sectdesc field move on the next record and it works!!!!
>
>Is this a bug or is there an explanation for this???
>
>Cheers, Mark
Previous
Reply
Map
View

Click here to load this message in the networking platform