Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql problems
Message
 
To
28/09/1998 20:43:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00141499
Message ID:
00142110
Views:
32
>If we cannot use the view designer to change this view, then how does one set the update criteria? The user needs write access to two of the fields in the view. Can update criteria be set from code?

You can also have code in your where clause like

where c.Name >= ?cLowerName and c.Name <= ? cUpperName

I use this technique alot, don't know if it's "good" but it works. Before I use the view I make sure the variables have a value, if I want everything I'll have them set to their maximum outer limits, if I want to restrict the view I'll have them set to what I really want.

In a single view I might have 3 "pairs" so I can limit by date, or values on the different tables. Typically each pair relates to one of the tables.

The "?" forces Fox to reevaluate the variable at runtime. If the variable doesn't exist Fox will ask you for a value, which is very annoying. Even for testing I'll have a wee .prg to create the variables.

Sarah
Sarah King
pcpropertymanager.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform