Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Records in Grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01498191
Message ID:
01498889
Views:
102
Problems with grids after updating or changing a datasource convinced me to save my grids as classes and remove them prior to datasource work and then reinstantiate them when done. No more problems.

>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
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform