Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why CursorFill() is faster than CursorRefresh() in a CA?
Message
From
01/12/2010 10:55:01
 
 
To
01/12/2010 10:40:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Miscellaneous
Thread ID:
01491162
Message ID:
01491407
Views:
63
>>>If the file disappears from the file system, the RecordSource becomes invalid and VFP,
>>>instead of recovery the situation, VFP takes away from the grid.
>>>
>>>Try to ZAP,PACK,CursorFill() a Recordsource ...
>>>
>>>Then a cursor binded to a grid must maintain the appropriate file dbf
>>
>>
>>I don't know about the rest but ZAP works fine
>
>If, with this example your grid is still usable,
>then you have a new vfp


Your example shows that the grid is blank after the zap

However, if you do a grid.refresh() - it works fine
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		Height = 200, ;
		Left = 24, ;
		Top = 36, ;
		Width = 320, ;
		Name = "Grid1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 6, ;
		Left = 45, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "ZAP", ;
		Name = "Command1"


	PROCEDURE Load
		CREATE CURSOR AA (BB I)
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		LOCATE
	ENDPROC


	PROCEDURE command1.Click
		SELECT AA
		ZAP
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		APPEND BLANK
		replace ALL bb WITH 2
		LOCATE
		 =m.thisform.grid1.Refresh()  && added this
		&& BROWSE
	ENDPROC

ENDDEFINE
*
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform