Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hard one
Message
De
11/09/1997 17:38:17
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
11/09/1997 17:21:49
Shawn Edwards
Dallas Summer Musicals
Dallas, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00049669
Message ID:
00049673
Vues:
55
You must have buffering turned on for tablerevert to work. You need to set multilocks on, and choose a buffering mode for you table in the dataenvironment/cursor object.. For simple record or row buffering you need something like
CURSORSETPROP("Buffering", 3)

Bob


>OK, I've got a good one.
>
>When I run my form using the standard wizstule buttons, I get an error back when I click the revert button. Here it is:
>
>Function requires row or table buffering mode
>
>This points back to a line in the Cmdedit.Click function labeled: =TableRevert(.T.)
>
>I am enclosing the code for this button, which is the standard code. Any ideas anyone?
>
>Code is as follows:
>
>#DEFINE C_NOUPDATE_LOC "You cannot edit because the view(s) selected does not send updates."
>
>LOCAL lNoSendParentUpdates,lNoSendChildUpdates
>LOCAL aTablesUsed,nTablesUsed,i
>
>** Reverting record
>IF THIS.Parent.EditMode
>
> IF THIS.Parent.UseDataEnv
> SELECT (THIS.Parent.OldAlias)
> =TableRevert(.T.)
> IF !EMPTY(THIS.Parent.GridAlias)
> SELECT (THIS.Parent.GridAlias)
> =TableRevert(.T.)
> ENDIF
> ELSE
> DIMENSION aTablesUsed[1]
> m.nTablesUsed = AUSED(aTablesUsed)
> FOR i = 1 TO m.nTablesUsed
> =TableRevert(.T.,aTablesUsed[m.i,1])
> ENDFOR
> ENDIF
>
> * Go back to original place
> SELECT (THIS.Parent.OldAlias)
> IF RECCOUNT() < THIS.Parent.OldRec &&added record at EOF()
> GO TOP
> ELSE
> GO THIS.Parent.OldRec
> ENDIF
>ELSE
>
> * Check to see if view allows updates
> IF CURSORGETPROP("SourceType")#3 AND !CURSORGETPROP("SendUpdates")
> lNoSendParentUpdates = .T.
> ENDIF
> IF !EMPTY(THIS.Parent.GridAlias) AND ;
> CURSORGETPROP("SourceType",THIS.Parent.GridAlias)#3 AND ;
> !CURSORGETPROP("SendUpdates",THIS.Parent.GridAlias)
> lNoSendChildUpdates= .T.
> ENDIF
>
> IF (m.lNoSendChildUpdates AND m.lNoSendParentUpdates) OR;
> (EMPTY(THIS.Parent.GridAlias) AND m.lNoSendParentUpdates)
> =MESSAGEBOX(C_NOUPDATE_LOC)
> RETURN
> ENDIF
>
> THIS.Parent.OldAlias = ALIAS() &&save alias in case reverting
> THIS.Parent.OldRec = RECNO() &&save record in case reverting
>ENDIF
>
>** Editing record
>THIS.Parent.EditMode = !THIS.Parent.EditMode
>THIS.Parent.AddMode = .F.
>THISFORM.LockScreen = .T.
>THIS.Parent.ButtonRefresh()
>THIS.Parent.NavRefresh()
>THISFORM.LockScreen = .F.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform