Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using remote views with a VFP 5 Backend
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00484790
Message ID:
00484948
Vues:
15
>I am using a remote view on a VFP Database Container called "Server".
>
>I have stored procedures in the "Server" DBC.
>One of my tables called "Caller" has a default Field Value for one of the columns. It get the value from the stored procedure in the DBC. If I open the table and insert into it all works fine.
>
>Now, if I use the remote view that points to the same table, the stored procedure does not fire when the remote view issues the update. Am I doing something wrong? Or is this the normal way for this to work?
>
>Thanks for the help.

This is, unfortunately, the way things normally work with remote views, as they have no knowledge of any data changes that will occur on the back end. When you add a record thru a remote view, the field your default applies to (let's assume it is a character field, for example) will, in effect, already have a value, even though it is empty. When the change is sent by the RV back to SQL Server, the SQL table accepts that value and will not fire the default.

This is one of the reasons that I dislike using remote views. To get around this, you would need to fire off an SP on the back end to create the "shell" record (allowing the defaults to work properly), capture the key of the record just created, and pass it to VFP. The VFP RV would need to requery for the new key value to get the record to do further processing. In short, it is a PITA.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform