Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Records in Grid
Message
From
01/02/2011 13:57:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
No Records in Grid
Miscellaneous
Thread ID:
01498191
Message ID:
01498191
Views:
122
IF thisform.actNewType.Caption = "Cancel Add Tool Type"
IF EMPTY(thisform.txtDescription.Value)
MESSAGEBOX("Please provide a Description")
thisform.txtDescription.SetFocus
RETURN
ENDIF

thisform.txtDescription.Visible = .F.
thisform.chkHasFeedback.Visible = .F.
thisform.chkNeedsMaint.Visible = .F.
thisform.chkHasFeedback.Visible = .F.
thisform.chkNeedsSN.Visible = .F.

INSERT INTO (thisform.grdToolType.recordsource);
(description,needsSerialNo,needsMaintenance,hasFeedback,isActive);
VALUES;
(thisform.txtDescription.value, thisform.chkNeedsSN.value, thisform.chkNeedsMaint.value,
thisform.chkHasFeedback.value,1)
ENDIF

thisform.LockScreen = .T.
thisform.actNewType.Caption = "Add New Tool Type"

SELECT (thisform.grdToolType.recordsource)
lcFilter = SET("FILTER")
SET FILTER TO

thisform.oDataClass.update_remote_table("mech_pib","crsToolType","tool_type","idtool_type")
thisform.oDataClass.get_table("mech_pib","tool_type","crsTemp")

SELECT (thisform.grdToolType.recordsource)
ZAP
APPEND FROM DBF('crsTemp')
SET FILTER TO &lcFilter
GO TOP

thisform.grdToolType.refresh

MESSAGEBOX("Data has been saved")

thisform.LockScreen = .F.

At this point there are no records displayed in the grid. The cursor has the expected number of records. If I press a navigation button the grid displays the correct recordset. I put a KEYBOARD command at the end of the method and it's working but I would appreciate an explanation as to why I need to do that.

The cursor is created by an SQLEXEC and the buffering is whatever the default would be for that (I think 3).

Thanks to all.................Rich
Next
Reply
Map
View

Click here to load this message in the networking platform