Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very basic question about the Update of data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00621075
Message ID:
00626032
Vues:
14
>Can you please give a brief example of buffering, say when I've selected a record and presented to the user on a form for editing, what's the syntax for commiting the edit/update to the table, or reverting to the original data?

PMFJI, Here is an example :). For a detailed explanation see: "Data Buffering in Visual FoxPro" in the articles archive here in the UT.
Use myTable
CursorSetProp("Buffering" , 5, "myTable") && Turn optomistic table buffering on

Replace myfield With "Thud" In myTable && change some data
** The field could also be bound to a control on a form.

Do Case
	Case Dow(Date()) = "Monday" && make the user a little more miserable
		Tablerevert(.T., "myTable") && discard any changes to the table

	Case Dow(Date()) = "Friday" && Make the user happy
		Tableupdate(.T., .T., "myTable") && save changes to the table.

	Otherwise && be ambivalent
		Messagebox("Today just isn't your day!")

Endcase
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform