Delphi¿Ø¼þ°²×°·½·¨
ÓÉÓÚ×é¼þÌṩµÄ·½Ê½²»Í¬£¬ËùÒÔ°²×°µÄ·½·¨Ò²ÊDz»Ò»ÑùµÄ£¬ÏÂÃæ¾ÍÄ¿Ç°³£¼ûµÄ¸÷ÖÖÐÎʽµÄ×é¼þµÄ°²×°·½·¨½éÉÜһϡ£
1 Ö»ÓÐÒ»¸öDCUÎļþµÄ×é¼þ¡£DCUÎļþÊDZàÒëºÃµÄµ¥ÔªÎļþ£¬ÕâÑùµÄ×é¼þÊÇ×÷Õß²»Ïë°ÑÔ´Â빫²¼¡£Ò»°ãÀ´Ëµ£¬×÷Õß±ØÐë˵Ã÷´Ë×é¼þÊʺÏDelphiµÄÄÄÖÖ°æ±¾£¬Èç¹û°æ±¾²»¶Ô£¬ÔÚ°²×°Ê±¾Í»á³öÏÖ´íÎó¡£Ò²ÕýÊÇÒòΪûÓÐÔ´Â룬¸øʹÓÃÕß´øÀ´Á˲»±ã£¬ÄǾÍÊÇÒ»µ©Delphi°æ±¾Éý¼¶£¬´Ë×é¼þ¾Í²»ÄÜÔÙʹÓÃÁË£¬µ±È»ÓеÄ×÷Õ߸ø³öÁ˼¸ÖÖ°æ±¾µÄDCUÎļþ£¬Óû§¸ù¾ÝÐèҪѡÔñʹÓá£ÕâÑùµÄ×é¼þµÄ°²×°·½·¨ÊÇ£ºÔÚComponent²Ëµ¥ÖУ¬Ñ¡Ôñinstall component£¬ÔÚ¶Ô»°¿ò "into existing package"Ò³ÖУ¬µ¥»÷“Unit file name”ºóµÄ“Browse”°´Å¤£¬ÔÚ´ò¿ªµÄÎļþ¶Ô»°¿òÖУ¬½«“ÎļþÀàÐÍ”É趨Ϊ*.dcu£¬ÕÒµ½Òª°²×°µÄDCUÎļþ£¬°´OK°´Å¥·µ»Ø"into existing package"Ò³ºóÔÙ°´OK°´Å¥¾Í¿ÉÒÔ°²×°ÁË¡£×¢Ò⣬´ËʱDelphi»áÌáʾdclusr40.dpk½«±»Öؽ¨£¬ÊÇ·ñ¼ÌÐø£¬OK¾Í¿ÉÒÔÁË¡£ÕâÀïÊǽ«×é¼þ°²×°µ½dclusr40.dpk°üÖУ¬´Ë°ü´ÓÎļþÃûÉÏ¿ÉÒÔ¿´³öÊÇÓû§×Ô¶¨Òå×é¼þ°ü£¬ÏÈ°²×°µ½Õâ¸ö°üÖаɣ¬ÏÂÃæÔÙ½²ÓйØ×¢ÒâÊÂÏî¡£°²×°Íê±Ï»áÓÐÒѾ½«×é¼þ×¢²áÍêµÄÌáʾÐÅÏ¢ÒÔ¼°°²×°µ½Äĸö×é¼þÒ³ÖеÄÐÅÏ¢µÈ£¬µ½×é¼þÃæ°åÉÏ¿´¿´£¬Ò»°ã»á³öÏÖÒ»¸öеÄ×é¼þÒ³£¬ÆäÖÐÓиհ²×°µÄ×é¼þ¡£
2¡¢ Ö»ÓÐPASÎļþ»ò¼ÈÓÐPASÓÖÓÐDCUÎļþµÄ×é¼þ¡£ÕâÖÖ×é¼þÒòΪÓÐPASÎļþ£¬Ò²¾ÍÊÇ˵×÷ÕßÌṩÁËÔ´Â룬Õâ¾ÍºÃ°ì¶àÁË¡£°²×°µÄ·½·¨ºÍÉÏÃæÊÇÒ»ÑùµÄ£¬ÔÚÎļþÀàÐÍÖпÉÒÔÉ趨ΪDCUÒ²¿ÉÒÔÉ趨ΪPAS£¬½¨ÒéÉ趨ΪPAS£¬ÕâÑù¿ÉÓÃÄãµÄDelphiÖØбàÒëһϣ¬¿´ÊÇ·ñ»á³öÏÖÎÊÌâ¡£DelphiÉý¼¶ºóÖ»ÄÜÑ¡ÔñPASÎļþ°²×°£¬ÕâÑù²ÅÄÜÖØбàÒ룬ʹµÃ×é¼þÄÜÊÊÓ¦ÐÂDelphi°æ±¾¡£ÕâÑùµÄ×é¼þÊǺÜÖµµÃʹÓõģ¬¸ù¾ÝÐÄÁåµÄ¾Ñ飬ûÓÐÔ´ÂëµÄ×é¼þ×îºÃ²»ÒªÊ¹Óã¬Ò»ÊÇ´æÔÚDelphi°æ±¾Éý¼¶ºóÎÞ·¨Ê¹ÓõÄÎÊÌ⣬ÔÙÕßµ±³ÌÐò³öÏÖÎÊÌâºóÓû§ÎÞ·¨µ÷ÊÔ×é¼þÀ´ÅжÏÊÇ·ñÊÇ×é¼þÖдæÔÚBUG¡£
3¡¢ÓÐdpkÎļþµÄ×é¼þ°ü¡£´øÓÐdpkÎļþµÄ×é¼þ°üÒ»°ãÊÇÓжà¸ö×é¼þ¹¹³ÉµÄ£¬Ò²¾ÍÊÇ˵°²×°ºó»áÓжà¸ö×é¼þ¹©Ê¹Óã¬Èç¹ûÖ»ÓÐÒ»¸ö×é¼þ×÷ÕßÒ»°ã²»»áÖƳÉDPKÎļþ£¬Ê¹ÓÃÉÏÃæµÄ·½Ê½·¢²¼¾Í¿ÉÒÔÁË¡£¶ÔÓÚÕâÑùµÄ×é¼þ°ü£¬Ò»°ãÀ´Ëµ»áÓÐÏêϸµÄ°²×°ËµÃ÷Îļþ£¬ÈçÉÏÃæÌáµ½µÄRXLIB£¬ÓÉÓÚ×é¼þ¸´ÔÓÇÒ°²×°Ê±ÓÐÏȺó˳Ðò£¬×÷Õß²»Ìṩ°²×°ËµÃ÷Óû§¸ù±¾ÎÞ·¨ÕýÈ·°²×°¡£Èç¹ûûÓа²×°ËµÃ÷Îļþ£¬ÄÇôÓÃÏÂÃæµÄ·½·¨°²×°£ºÔ
Ïà¹ØÎĵµ£º
====================================================
Delphi²Ù×÷ÎļþµÄÒ»°ã²½Ö裺
1£©¹ØÁªÎļþ£º
AssignFile(var F; FileName :string)£»
2£©³õʼ»¯Îļþ£º
Append(var F :Text);
//ֻд£¬ÓÚÎļþ×îºó×·¼ÓÊý¾Ý
Reset(var F [; RecSize :Word]);   ......
ÔÚsql server µÄnorthwide Öн¨Á¢Ö÷±í
create table sell_h( sell_id char(10),cust_name char(10) Primary key(sell_id) )
go
create table sell_h( sell_id char(10),inv char(10) ,amt float,qty float Primary key(sell_id,inv) )
Ê×ÏÈ,ҪעÒâÒÔÏÂÉèÖÃ
1.ҪעÒⱨ´Ó±íqrydetailÉèÖÃ,Åú±£´æ¿ªÊ½. ¼´.locktype= batc ......
3.2 Óû§µÇ¼·½°¸
ÔÚ½øÈëÒ»¸öϵͳʱ£¬±ØÐëÏÈÔڵǼ´°ÌåÖÐÊäÈëÕýÈ·µÄÓû§ÃûºÍÃÜÂë²ÅÄܽøÈë¡£ÕâÑù¿ÉÒÔÈ·±£ÏµÍ³µÄ°²È«ÐԺͱ£ÃÜÐÔ£¬µÇ¼´°ÌåµÄÖÆ×÷°´ÕÕϵͳµÄ´óС¼°Óô¦£¬¿ÉÒÔ·ÖΪ²»Í¬µÄµÇ¼´°ÌåÑùʽ£¬ÔÚϵͳµÚÒ»´ÎµÇ¼ǰ£¬Ê×ÏÈÒª¶Ô²Ù×÷Ô±ÐÅÏ¢½øÐÐÏàÓ¦µÄÉèÖᣱ¾½Ú½«¶ÔµÇ¼´°Ìå¼°²Ù×÷Ô±¹ÜÀí´°ÌåµÄÖÆ×÷¹ý³Ì½øÐÐÏêϸµÄ˵Ã÷ ......
3.2 Óû§µÇ¼·½°¸
ÔÚ½øÈëÒ»¸öϵͳʱ£¬±ØÐëÏÈÔڵǼ´°ÌåÖÐÊäÈëÕýÈ·µÄÓû§ÃûºÍÃÜÂë²ÅÄܽøÈë¡£ÕâÑù¿ÉÒÔÈ·±£ÏµÍ³µÄ°²È«ÐԺͱ£ÃÜÐÔ£¬µÇ¼´°ÌåµÄÖÆ×÷°´ÕÕϵͳµÄ´óС¼°Óô¦£¬¿ÉÒÔ·ÖΪ²»Í¬µÄµÇ¼´°ÌåÑùʽ£¬ÔÚϵͳµÚÒ»´ÎµÇ¼ǰ£¬Ê×ÏÈÒª¶Ô²Ù×÷Ô±ÐÅÏ¢½øÐÐÏàÓ¦µÄÉèÖᣱ¾½Ú½«¶ÔµÇ¼´°Ìå¼°²Ù×÷Ô±¹ÜÀí´°ÌåµÄÖÆ×÷¹ý³Ì½øÐÐÏêϸµÄ˵Ã÷ ......
ÎÒÃÇÄÜ¿´µ½ÒÔÏ´úÂë
var pSource,pDest:PChar;
len: integer;
.......................//һЩ´úÂë
Move(pSource,pDest,len); //´íÎó
Move(pSource^,pDest^,len); //ÕýÈ·
¿´ÆðÀ´È·ÊµºÃÏñÊÇ´«Öµ£¬¶ø²»ÊÇ´«µØÖ·£¬µ«ÊǸ÷λ±ðÍüÁË£¬Õâ²»ÊÇC£¬C++£¬¶øÊÇDelphi
Object Pascal,ËùÒÔ£¬¾ø²»ÄÜ´Óº¯Êýµ ......