Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Abstract Data Classes - FPA Dec 97
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00066219
Message ID:
00066638
Vues:
46
>I think using predefined views would be even simpler than that. The behavior class is designed to generate an SQL statement. The SQL statement of a view is embedded. I expect that all that would be necessary would be to USE the view. Perhaps the cursor manager could be modified to issue the USE command instead of passing the command along for view type cursors. In many ways the abstact data classes serve as an alternative to the VFP view. They create and issue the SQL, handle connections, and perform updates.

OK, now that I look at this again I see what your saying. Your statement here about the Abstract Data Classes kind of serve as replacement for the VFP view seems correct, although it's somewhat of a scary thought. Everything else we've seen before this article always stressed that Client-server apps should use views. And it makes me wonder, the article's title is afterall "Data Classes that make Client-server easier". So does "easier" mean cursors instead of views? hmmmmm.... don't know about you but I believe I need to think on this a little longer.

So where we stand on this first issue (I think?) is that the downside of using the cursors the way the classes are presented in the article is that we loose the ability to do buffering and thus supporting more than one user making changes to a table. And we got two possible alternatives of adapting these classes, either use views instead of cursors, or make use of USE DBF(...) AGAIN.

>As to USE AGAIN vs. SQL-View:
> (IMHO) If the technique will continue to work in latter versions of VFP, it offers a simpler and more flexible way to present data to the user and collect data from the user. The only real drawback is the fact that all cursors I have been able to create are 'table cursors' whose update properties cannot be set. This means writing code to grab updated records and apply them to the target tables, whereas views handle this automatically.

So ok, this technique of USE DBF('cursor') AGAIN ALIAS something is new for me and I only started playing with it this week. But what I'm seeing when I try it is that I can still set table properties to enable buffering and whatnot from the Data Session window. What do you mean by Update Properties?
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform