{"id":24161,"date":"2020-11-02T14:58:20","date_gmt":"2020-11-02T07:58:20","guid":{"rendered":"https:\/\/tom.ji42.com\/?p=24161"},"modified":"2020-11-02T14:58:20","modified_gmt":"2020-11-02T07:58:20","slug":"difference-between-requery-and-refresh-in-visual-foxpro","status":"publish","type":"post","link":"https:\/\/tom.tomwork.net\/?p=24161","title":{"rendered":"Difference Between REQUERY and REFRESH in Visual FoxPro"},"content":{"rendered":"<p>Article: Q130462<br \/>\nProduct(s): Microsoft FoxPro<br \/>\nVersion(s): WINDOWS:3.0,5.0,6.0<br \/>\nOperating System(s):<br \/>\nKeyword(s): kbvfp300 kbvfp500 kbvfp600<br \/>\nLast Modified: 19-OCT-2000<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nThe information in this article applies to:<\/p>\n<p>&#8211; Microsoft Visual FoxPro for Windows, versions 3.0, 5.0, 6.0<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>SUMMARY<br \/>\n=======<\/p>\n<p>This article lists the differences in functionality between two new functions &#8211;<br \/>\nREQUERY() and REFRESH() &#8211; in Visual FoxPro.<\/p>\n<p>MORE INFORMATION<br \/>\n================<!--more--><\/p>\n<p>REQUERY()<br \/>\n&#8212;&#8212;&#8212;<\/p>\n<p>&#8211; Retrieves data again for a SQL view.<\/p>\n<p>&#8211; Throws out the current cursor and starts over, possibly with new parameters.<\/p>\n<p>&#8211; Pulls in all rows.<\/p>\n<p>&#8211; Returns 1 if data is successfully retrieved; otherwise, it returns 0.<\/p>\n<p>&#8211; Is typically used to refresh a SQL view when data has changed on the data<br \/>\nsource.<\/p>\n<p>REFRESH()<br \/>\n&#8212;&#8212;&#8212;<\/p>\n<p>&#8211; Refreshes data in an updatable SQL view. It goes back to the server and gets<br \/>\nnew values for any rows that you haven&#8217;t edited in a buffered view. (It also<br \/>\ncaches an image of the rows you have been editing, but it doesn&#8217;t force these<br \/>\nvalues over the top of your changes.)<\/p>\n<p>&#8211; Is helpful for checking to see whether other users have changed data while<br \/>\nyou&#8217;ve been buffering.<\/p>\n<p>&#8211; Takes an optional parameter to specify what rows to update, so you can grab<br \/>\njust the ones that are currently on the user&#8217;s screen, for example.<\/p>\n<p>&#8211; Is a necessary precursor to issuing CURVAL() for remote data.<\/p>\n<p>&#8211; Returns the number of records refreshed. The records are refreshed with data<br \/>\nfrom the tables from which the SQL view is created. Records are refreshed in<br \/>\nthe SQL view open in the currently selected work area.<\/p>\n<p>&#8211; Cannot refresh locked or buffered records, and the records refreshed must<br \/>\nhave unique primary keys. If a record in a table does not have a primary key<br \/>\nvalue, the corresponding record in the SQL view is marked for deletion.<\/p>\n<p>REFERENCES<br \/>\n==========<\/p>\n<p>For more information about REQUERY() and REFRESH(), search for the &#8220;REQUERY()<br \/>\nfunction&#8221; and &#8220;REFRESH() function&#8221; topics in the Visual FoxPro Help menu.<\/p>\n<p>Additional query words: VFoxWin<\/p>\n<p>======================================================================<br \/>\nKeywords : kbvfp300 kbvfp500 kbvfp600<br \/>\nTechnology : kbVFPsearch kbAudDeveloper kbVFP300 kbVFP500 kbVFP600<br \/>\nVersion : WINDOWS:3.0,5.0,6.0<br \/>\nIssue type : kbinfo<\/p>\n<p>=============================================================================<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Article: Q130462 Product(s): Microsoft FoxPro Version(s): WINDOWS:3.0,5.0,6.0 Operating System(s): Keyword(s): kbvfp300 kbvfp500 kbvfp600 Last Modified: 19-OCT-2000 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- The information in this article applies to: &#8211; Microsoft Visual FoxPro for Windows, versions 3.0, 5.0, 6.0 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- SUMMARY ======= This article lists the differences in functionality between two new functions &#8211; REQUERY() and REFRESH() &#8211; in Visual [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-24161","post","type-post","status-publish","format-standard","hentry","category-13"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6cOVM-6hH","_links":{"self":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/24161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24161"}],"version-history":[{"count":1,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/24161\/revisions"}],"predecessor-version":[{"id":24162,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/24161\/revisions\/24162"}],"wp:attachment":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}