Information générale
Catégorie:
Codage, syntaxe et commandes
I agree it's old-fashioned, it's just easy and has that nice Object-layer ability. All the properties can be bound to controls with the same names as the Table fields.
I wrote a PRG-based Session that loops thru a Table structure and does something similar by creating same-name properties and assigning Table values. The nice benefit is you can easily bring up a Blank record to start the Form with instead of whatever data-bound record currently pointed to...my users were getting tired of seeing the first (or last, whatever) table record everytime they brought up a data-bound Form...
You do lose inherent VFP Buffering though, as you said...
Just some thoughts,
>>There have been a couple of good answers to your question already, and of course the answer is debateable, depending on your program's size, complexity, need for portability, etc.
>>
>>Just to allow another idea: you can Scatter/Gather (or assign in code) Table Field values to Object Properties, then bind the Properties to the Textboxes, etc. This creates a transaction layer that allows for easier transition to another Data Engine in the future (like SQL,Oracle, etc.)...
>
>That's the old-fashioned method. In VFP, you can use buffering - basically, VFP keeps care of many of the tasks related to storing old vs. new values.
>
>This should work both for local and remote data.
>
>Hilmar.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement