(3)±£´æ±íµ¥Îļþ¡£
(4)ÔÚ´°¿ÚÖÐÊäÈëÃüÁdo form bd1£¬À´ÔËÐÐ±íµ¥bd1£¬ÔÚ±íµ¥ÉÏ°´ÏÂÊó±êÓÒ¼ü¾Í»áµ¯³ö¿ì½Ý²Ëµ¥£¬²âÊÔ¿ì½Ý²Ëµ¥µÄ¹¦ÄÜ¡£
×¢£ºÉÏÊö¿ì½Ý²Ëµ¥µÄ¶¨ÒåÓëµ÷ÓÃÊDz½ÖèÏà¹ØµÄ£¬Çë°´²½Öè½øÐС£
3£®ÔÚ¶¥²ã±íµ¥Öе÷ÓÃÒ»°ã²Ëµ¥ (1)½¨Á¢²Ëµ¥ ²Ù×÷²½ÖèÈçÏ£º
¢Ùµ¥»÷¡°Îļþ¡±²Ëµ¥Öеġ°Ð½¨¡±²Ëµ¥ÏÔÚµ¯³öµÄ´°¿ÚÖÐÑ¡ÔñÎļþÀà±ðΪ¡°²Ëµ¥¡±£¬µ¥»÷¡°Ð½¨Îļþ¡±°´Å¥¡£ÔÚµ¯³öµÄ¡°Ð½¨²Ëµ¥¡±´°¿ÚÖÐÑ¡Ôñ¡°²Ëµ¥¡±£¬µ¥»÷¡°È·¶¨¡±°´Å¥£¬Æô¶¯ÁË¡°²Ëµ¥Éè¼ÆÆ÷¡±´°¿Ú¡£
¢ÚÊäÈë²Ëµ¥ÏîµÄÏàÓ¦Ãû³Æ£¬²¢Ñ¡Ôñ½á¹ûΪ¡°×Ӳ˵¥¡±£¬±íʾ½«À´µ¥»÷¸ÃÏ»áµ¯³öÒ»¸öÏÂÀ×Ӳ˵¥£¬ÈçÏÂͼËùʾ¡£
¢Ûµ¥»÷¡°Îļþµ÷Óá±ÏîÓұߵġ°´´½¨¡±°´Å¥£¬À´Éè¼Æ¡°Îļþµ÷Óá±µÄÏÂÀ×Ӳ˵¥¡£´Ëʱ£¬¡°²Ëµ¥Éè¼ÆÆ÷¡±ÉϵIJ˵¥¼¶ÏÔʾΪ¡°Îļþµ÷Óá±£¬±íʾĿǰÕýÔÚÉè¼Æ¡°Îļþµ÷Óá±ÏîµÄ×Ӳ˵¥£¬ÈçÏÂͼËùʾ¡£
¢ÜÊäÈëÏàÓ¦µÄ²Ëµ¥Ãû³Æ£¬ÔÚ¡°½á¹û¡±ÁÐÖÐÑ¡Ôñ¡°ÃüÁ£¬ÈçͼËùʾ¡£
×¢£º²Ëµ¥ÏîµÄ½á¹ûΪ¡°ÃüÁµÄº¬ÒåÊǵ±µ¥»÷¸Ã²Ëµ¥Ïîʱ£¬»áÖ´ÐÐÒ»ÌõVFPÃüÁҪִÐеÄÃüÁîÔÚºóÃæµÄ¿òÖÐÊäÈ룬È磺¡°bd1±íµ¥¡±ÏîµÄ½á¹ûΪ¡°ÃüÁ£¬ÃüÁî´úÂëΪ£ºdo form bd1¡£ ¢ÝÑ¡Ôñ¡°²Ëµ¥¼¶¡±ÖÐÄÚÈÝΪ¡°²Ëµ¥À¸¡±ºó£¬µ¥»÷¡°ÈÕÆÚÓëʱ¼ä¡±²Ëµ¥ÏîÓұߵġ°´´½¨¡±°´Å¥£¬À´Éè¼Æ¸ÃÏîµÄÏÂÀ×Ӳ˵¥£¬²¢¸ù¾ÝÏÂͼËùʾΪÏàÓ¦µÄ²Ëµ¥ÏîÑ¡ÔñÏàÓ¦µÄ¡°½á¹û¡±Ïî¡£
×¢£º
¢Ù µ¥»÷¡°ÈÕÆÚ¡±ÏîÓұߵġ°´´½¨¡±£¬ÊäÈëÈÕÆÚ¹ý³Ì´úÂëÈçÏ£º RQ=DATE()
Messagebox(ctod(RQ))
¢Ú Í˳ö²Ëµ¥ÏîµÄÃüÁîÊÇ£ºset sysmenu to default &&»Ö¸´VFPµÄ²Ëµ¥ÎªÏµÍ³Ä¬Èϲ˵¥¡£ ¢Û ½á¹ûÖеġ°¹ý³Ì¡±Ñ¡ÏîµÄº¬ÒåÊÇÖ´ÐжàÌõÃüÁ¶ø½á¹ûÖеġ°ÃüÁѡÏîµÄ¹¦ÄÜÊÇÖ´ÐÐÒ»ÌõÃüÁî¡£
¢ÞÉèÖøò˵¥¿É±»Ò»¸ö¶¥²ã±íµ¥µ÷ÓÃ
ÔÚ¡°ÏÔʾ¡±²Ëµ¥ÖÐÑ¡Ôñ¡°³£¹æÑ¡ÏÃüÁÔÚ´ò¿ªµÄ¶Ô»°¿ò´°¿ÚÖУ¬Ñ¡ÖС°¶¥²ã±íµ¥¡±¸´Ñ¡¿ò¡£
¢ßµ¥»÷¡°Îļþ¡±²Ëµ¥Ïµġ°±£´æ¡±ÃüÁ±£´æ²Ëµ¥ÎļþÃûΪMymenu.mnx¡£
¢àÔÚ¡°²Ëµ¥Éè¼ÆÆ÷¡±×´Ì¬Ï£¬µ¥»÷¡°²Ëµ¥¡±Öеġ°Éú³É¡±ÃüÁ¿É½«Mymenu.mnxÎļþÉú³ÉMymenu.mprµÄ²Ëµ¥³ÌÐòÎļþ¡£ (2)ÔÚ¶¥²ã±íµ¥Öе÷Óò˵¥ ¢Ùн¨Ò»¸ö±íµ¥ÎļþDCBD.SCX¡£
¢ÚÉèÖÃDCBD.SCXΪ¶¥²ã±íµ¥£¬¼´ÔÚ±íµ¥µÄÊôÐÔ´°¿ÚÖн«¸Ã±íµ¥µÄSHOWWINDOWÊôÐÔÉèÖÃΪ2-×÷Ϊ¶¥²ã±íµ¥¡£
¢ÛË«»÷±íµ¥£¬Ñ¡Ôñ¹ý³ÌΪINIT£¨»òload£©£¬ÔÚ±íµ¥µÄINIT£¨»òload£©Ê¼þÖÐÊäÈëÈçÏ´úÂ룺do mymenu.mpr with this,.t.¡£.
¢ÜÔÚ´°¿ÚÖÐÊäÈëÃüÁdo form DCBD.SCX£¬À´ÔËÐÐ±íµ¥DCBD£¬²âÊԲ˵¥ÏîµÄÖ´ÐÐÇé¿ö¡£
(3)ÆäËûҪ˵Ã÷µÄÎÊÌâ
¢Ù¸ø²Ëµ¥ÏîÌí¼ÓÈȼü£¬·½·¨ÊÇÔڲ˵¥ÃûµÄºóÃæÓá°\\<¡±¸úÉÏÒ»¸öÈȼü×Öĸ£¬È磺Îļþ£¨\\ ¢Û Ìí¼Ó²Ëµ¥ÏîÄ¿Ö®¼äµÄ·Ö¸îÏߣºÖ»Ðè°Ñ²Ëµ¥ÏîµÄÃû×Öд³É£º¡°\\-¡±£¬ÆäËûÏî²ÉÓÃϵͳĬÈÏÖµ ¼´¿É¡£ ¡¾ÊµÑµ12¡¿SQLÓïÑÔ ÊµÑµÄ¿µÄ: 1.ÕÆÎÕ²éѯÓï¾äSQL¡ªSELECTµÄ¹¦ÄÜÓëÓï·¨¡£ 2.ÕÆÎÕÊý¾Ý²Ù×ÝÓï¾äSQL¡ªINSERT¡¢SQL¡ªUPDATE¡¢SQL¡ªDELETEµÄ¹¦ÄÜÓëÓï·¨¡£ 3.ÕÆÎÕÊý¾Ý¶¨ÒåÓï¾äSQL¡ªALTERµÄ¹¦ÄÜÓëÓï·¨¡£ ʵѵÄÚÈÝ: 1¡¢½¨±í(½¨±íºó,¿ÉÓÃmodify structure Ð޸ıí½á¹¹ÃüÁî À´¿´±íµÄ½á¹¹) ? Ç°ÌáÌõ¼þ:create database SQLLX &&½¨Á¢Êý¾Ý¿âSQLLX£¬¸ÃÊý¾Ý¿âÊÇ´ò¿ªµÄ ? create table zgda1.dbf ; (±àºÅ c(6) not null,ÐÕÃû c(6),ÄêÁä n(2,0),¹¤×Ê f(6,2),»ñ½±´ÎÊý I,³öÉúÈÕÆÚ d,¹¤×÷ʱ¼ä t,»é·ñ l,¼òÀú m,ÕÕƬ g) ? create table zgda2.dbf (±àºÅ c(6) not null,ÐÕÃû c(6),ÄêÁä n(2,0),¹¤×Ê f(6,2)) ? create table zgda3.dbf (±àºÅ c(6) not null primary key,ÐÕÃû c(6),ÄêÁä n(2,0),¹¤×Ê f(6,2)) ? create table zgda3.dbf (±àºÅ c(6),ÐÕÃû c(6),ÄêÁä n(2,0) check ÄêÁä>0 error \ÄêÁäÒª´óÓÚ 0\ ? create table zgda3.dbf (±àºÅ c(6),ÐÕÃû c(6),ÄêÁä n(2,0) check ÄêÁä>0 error \ÄêÁäÒª´óÓÚ 0\ ? create table zgda4 free (±àºÅ c(6),ÐÕÃû c(6),ÄêÁä n(2,0)) &&zgda4ÊÇ×ÔÓɱí ×¢Ò⣺£¨±ízgda1----zgda4ÊÇÊý¾Ý¿â±í£¬²¢×Ô¶¯¼Óµ½µ±Ç°Êý¾Ý¿âSQLLXÖУ© (1) c n fÀàÐÍÐèÒªÖ¸¶¨¿í¶È n f bÀàÐÍÒªÖ¸¶¨¾«¶È (2)UNIQUE ºòÑ¡Ë÷Òý primary key Ö÷Ë÷Òý 2¡¢alter table Ð޸ıí½á¹¹ alter table zgda3 add column ÐÔ±ð c(2) check ÐÔ±ð=\Å®\ÐÔ±ð=\ÄÐ\ÐÔ±ðÖ»ÄÜΪÄлòÕßÅ®\ÄÐ\ ¹¦ÄÜ£ºÌí¼ÓÐÔ±ð×ֶβ¢ÉèÖÃÓÐЧÐÔ¹æÔò£¬Ä¬ÈÏֵΪÄС£ alter table zgda3 alter column ÐÔ±ð c(4) default \Å®\ &&ÎÞÓÐЧÐÔ¹æÔò£¬Ä¬ÈÏֵΪŮ alter table zgda3 alter column ÐÔ±ð c(4) check ÐÔ±ð=\Å®\ÐÔ±ð=\ÄÐ\ÐÔ±ðÖ»ÄÜΪÄлòÕßÅ®\Å®\ alter table zgda3 alter column ÐÔ±ð drop default &&ɾ³ýÐÔ±ð×Ö¶ÎµÄ Ä¬ÈÏÖµ alter table zgda3 alter column ÐÔ±ð drop check &&ɾ³ýÐÔ±ð×ֶεÄÓÐЧÐÔ¹æÔò alter table zgda3 alter column ÐÔ±ð set check ÐÔ±ð=\ÄÐ\ÐÔ±ð=\Å®\ÄлòÅ®?\alter table zgda3 alter column ÐÔ±ð set default \ÄÐ\ &&ÉèÖûò¸ü¸ÄÐÔ±ð×ֶεÄĬÈÏÖµ alter table zgda3 drop column ÐÔ±ð &&ɾ³ýÐÔ±ð×ֶΠalter table zgda3 rename ÐÕÃû to name &&ÐÕÃû×ֶθÄÃûΪname alter table zgda3 rename column name to NM 3¡¢drop table zgda4 &&ɾ³ý×ÔÓɱízgda4£¨ÇëÓÃclose database°ÑÊý¾Ý¿â¹Øµô,·ñÔòɾ³ý²»µô£© 4¡¢insert into: open database SQLLX &&Çë´ò¿ªÊý¾Ý¿âSQLLX create table zgda4.dbf (±àºÅ c(6),ÐÕÃû c(6),ÄêÁä n(2,0),³öÉúÈÕÆÚ d,»é·ñ L) insert into zgda4(±àºÅ,ÐÕÃû,ÄêÁä,³öÉúÈÕÆÚ,»é·ñ) values (\ÕÅÈý\ insert into zgda4(±àºÅ,ÐÕÃû,ÄêÁä,³öÉúÈÕÆÚ,»é·ñ) values(\ÀîËÄ\ insert into zgda4(±àºÅ,ÐÕÃû,ÄêÁä,³öÉúÈÕÆÚ,»é·ñ) values(\ÍõÎå\5¡¢delete dele from zgda4 where ÄêÁä>=40 &&ÓÃlistÃüÁîÏÔʾ¼Ç¼£¬¿É¿´µ½2Ìõ¼Ç¼¼ÓÉÏÁËɾ³ý±ê¼Ç¡£ 6¡¢update update zgda4 set ÄêÁä=ÄêÁä+1,³öÉúÈÕÆÚ=³öÉúÈÕÆÚ-1 &&ûÓÐwhereÌõ¼þ£¬Ôò¸üÐÂÈ«²¿¼Ç¼ update zgda4 set ÄêÁä=ÄêÁä+1,³öÉúÈÕÆÚ=³öÉúÈÕÆÚ-1 where »é·ñ=.t. &&¸üÐÂÒÑ»é¼Ç¼ 7¡¢select²éѯ(ÔËÐÐÏÂÃæµÄÓï¾ä£¬Ëµ³öÆ京Òå) select * from zgda select all Ö°³Æ from zgda &&all¿ÉÊ¡ÂÔ£¬²é³öËùÓмǼµÄÖ°³Æ×Ö¶ÎÖµ select distinct Ö°³Æ from zgda &&²é³öËùÓмǼµÄÖ°³Æ×Ö¶ÎÖµ£¬È¥µôÖظ´ÐС£ select ÐÕÃû,ÐÔ±ð,ÄêÁä,Ö°³Æ from zgda select top 3 * from zgda order by ±àºÅ desc &&²é±àºÅ×î´óµÄÇ°3Ìõ¼Ç¼ select top 50 percent * from zgda order by ÄêÁä desc &&²éÄêÁä×î´óµÄÇ°Ò»°ë¼Ç¼