MasteringVFP/4/8
出自VFP Wiki
強大ç Filter
å¨æ©æç¡æ³ä½¿ç¨ SQL çæå,è¦å¦ä½ç¯©é¸è³æå¢??éæåå°±æ¯ç¨ Filter å¦... èªªå° Filter, ä»çæ·å²å¯æ¯å¾æ ä¹ çå¢~å¨ dBase æ代就已ç¶åå¨äº. è¨å® Filter çæ¹æ³å¾ç°¡å®,å°±æ¯é樣å:
set filter to æ¬ä½=å¼
èåæ¶ä¹å樣ç容æ:
set filter to
å¨ä»¥å,å·è¡å® set filter to 以å¾,æ好è¦ç§»åä¸ä¸ç´é,è® Filter çæ,ä¾å¦ go top, ææ¯ go bottom...,å¦åä½ æå¯è½ç¼ç¾,Filter æ²æçæ...
ä¸é¢æåå°±èåç°¡å®çä¾å,é裡æ¯æææ客æ¶ç·¨èåé¢çº "S01" çäººé½ browse åºä¾.
use customers set filter to customers.id="S01" go top browse
注æå,éè£çºä»éº¼èªªææææ客æ¶ç·¨èåé¢çº "S01" çäººé½ browse åºä¾å¢??éåå,æ¯å çº VFP å¯ä»¥é¸æåæä¸å精確æ¯å°( set exact on / set exact off ). æè¬ç精確æ¯å°,ææå°±æ¯å¿ é è¦å®å ¨ç¬¦å,æ¢ä»¶æææç«,ä¹å°±æ¯èªª "S01" æçæ¼ "S01" èä¸çæ¼ "S0100". VFP é è¨è¡çºæ¯é精確æ¯å°,ä¹å°±æ¯èªª "S01" æçæ¼ "S0100" ä¹æçæ¼ "S01". éåè¨å®å¯ä»¥ç´æ¥å° ((MasteringVFP/1/4|Options)) å»è¨å®,ä¹å¯ä»¥ç´æ¥ä½¿ç¨ set exact å»è¨å®çº on æ off.
å°é裡,ç¸ä¿¡é½æç½ Filter å¦ä½ä½¿ç¨äºå§~ ä¸é,å¦æä½ Remote View + Filter çæå,æç¼ç¾æçå¾æ ¢. éæ¯å çº Filter æéè¦ææè³æ,æè½å篩é¸çåä½,æ以 Remote View æ試åä¸è¼ææé 端è³æåä¾.ä½éä¹ä¸æ¯èªª Filter ä¸å¥½,åªæ¯,ä½ å¿ é è¦äºè§£ä»çåªç¼ºé»,èå ¶ä»æ令交äºæé 使ç¨,æè½ç¼æ®å®çæå.