RE:inicios con el buffering
si quieres almacenar o compartir registros en red usando cursores sql
este ejemplo puede ser de útilidad .:
el comando SET MULTILOCKS ON siempre debe se igual a On
si no usamos cursores Sql .
Set Exclusive Off
sele tu tabla
If Rlock()
Append Blank
Campo With Thisform.Text(o variable )
endif
supongamos que tengo un botón Grabar
SET MULTILOCKS ON
Sele micursor
publi codig,fam
codig=Thisform.Pageframe1.Page1.Text1.Value
fam=Thisform.Pageframe1.Page1.Text2.Value
= CURSORSETPROP('Buffering', 5, 'micursor')
INSERT INTO Familia(Codigo,Familia);
VALUES(Codig,Fam)
= TABLEUPDATE(.T.)
Thisform.Procc()
Thisform.Pageframe1.Page1.Text1.Value=""
Thisform.Pageframe1.Page1.Text2.Value=""
Select * From familia Into Cursor micursor2
Thisform.Pageframe1.Page2.Grid1.AllowAddNew=.f.
Thisform.Pageframe1.Page2.Grid1.ColumnCount=2
Thisform.Pageframe1.Page2.Grid1.RecordSource="micursor2"
Thisform.Pageframe1.Page2.Grid1.Column1.Header1.Caption="Código"
Thisform.Pageframe1.Page2.Grid1.Column1.Header1.FontBold=.t.
Thisform.Pageframe1.Page2.Grid1.Column1.ControlSource="micursor2.codigo"
Thisform.Pageframe1.Page2.Grid1.Column1.Format="!"
*----------------------------------------------------------------------------
Thisform.Pageframe1.Page2.Grid1.Column2.Header1.Caption="Nombre Familia"
Thisform.Pageframe1.Page2.Grid1.Column2.Header1.FontBold=.t.
Thisform.Pageframe1.Page2.Grid1.Column2.ControlSource="micursor2.familia"
Thisform.Pageframe1.Page2.Grid1.Column2.Format="!"
Thisform.Pageframe1.Page2.Grid1.Column2.Width=240
Thisform.Pageframe1.Page2.Grid1.Refresh
Thisform.Command1.Refresh
**_____________________________________________________
Botón Modificar **
SET MULTILOCKS ON
Publi codig,fam
codig=Thisform.Pageframe1.Page1.Text1.Value
fam=Thisform.Pageframe1.Page1.Text2.Value
= CURSORSETPROP('Buffering', 5, 'micursor')
UPDATE familia SET Codigo= codig,familia=fam WHERE Alltrim(Codigo)=Allt(Codig)
= TABLEUPDATE(.T.)
Thisform.Procc()
Thisform.Pageframe1.Page1.Text1.Value=" "
Thisform.Pageframe1.Page1.Text2.Value=" "
*_____________________________________________________