Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differences between VFP and SQL Server
Message
From
11/05/2008 05:14:04
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
Differences between VFP and SQL Server
Miscellaneous
Thread ID:
01316284
Message ID:
01316284
Views:
55
I've been working with a VB 2008/SQL app for a little while now, and have noticed that some of my old VFP tricks and habits just don't seem to apply.

Take, for example, setting up a grid with values from a table, but one of those values is a lookup key into another table and we want to replace that with the corresponding string in that table. In VFP, it's no problem to set up a browser such that there's a live relation in place to do the lookup and syntax to set up the string field. And if I change the string in the lookup table, that change will immediately propagate across the browser.

However, so far in my experience, using VB 2008 and its DataGridView, there's no direct way to reach across related tables. I've found two indirect ways to get the same effect, one of which I'm using. The one I'm not using is to create a new DataSet that includes the lookup string, but I'm convinced that theoretically it shouldn't have to be embedded in the data in there. The method that I am using is to turn the column in question into a read-only ComboBox, driven by the lookup table's BindingSource and set up to look like a TextBox. It work perfectly, except that if I change the string in the lookup table, the change will not propagate until the app is closed and restarted (this grid is in the main form).

Other methods that have been proposed (like JoinView and DataView) don't buy me anything and actually tend to disconnect me from my main table. It seems to me that SQL Server just doesn't grok the concept of live pointers and table refreshes that VFP does. Either that or I'm really missing something (which I'd really prefer).

Any hints?

David
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Reply
Map
View

Click here to load this message in the networking platform