Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

delphiʵÏÖÅúÁ¿¶ÁÈ¡¸ñʽÓйæÂɵÄÎı¾ÎļþµÄÄÚÈÝ.

ÏÖÓÐһϵͳ²»¶¨Ê±ÔÚͬһĿ¼ÏÂÉú³ÉÒ»ÅútxtÎļþ,ÄÚÈÝ´ó¸ÅÈçÏÂ;
      20100112_164910,6,81406392,808,113,,
Ϊ·½±ãͳ¼Æ,ÐèÒª½«ÕâЩtxtÎļþÖеÄÊý¾Ý¶ÁÈëÊý¾Ý±íÖÐ.
ÏÖÓÐÁ½ÖÖ·½·¨:
   Ò»ÊÇÖ±½Ó½«Êý¾Ý¶ÁÈëµ½Êý¾Ý±íÖеÄijһÁÐÖÐ,ÔÙÓÃsql Óï¾ä²ð¿ª³É¼¸ÁÐ: 
       20100112_164910   6     81406392      808         113
  ¶þÊÇÔÚµ¼Èëʱ¾Í½«Æä²ð¿ª³É¼¸Áзֱðµ¼Èëµ½¸÷ÁÐÖÐ
Èç¹ûµÚ¶þÖÖ·½·¨¿ÉÒÔʵÏÖ,ÄÇô¶ÔÓÚϵͳµÄÐÔÄܽ«»áÊÇÒ»¸öºÜ´óµÄ°ïÖú.
ÏÂÃæ½éÉÜÎÒµÄ×ö·¨,¿ÉÄÜÊÇ×ÖصÄÒ»ÖÖ,»¶Ó­´ó¼ÒÌá³ö¸üºÃµÄ·½·¨.
   ºËÐÄ·½·¨Êǵ÷ÓÃmemoµÄDelimiterÌØÐÔ. Èô°ÑDelimiterµÄÖµÉèΪ",",ÄÇôʹÓÃDelimitedTextÊôÐԿɵõ½ÓÉ","·Ö¿ªµÄ¼¸ÐÐ.
ÐèÒªÁ½¸ömemo,µÚÒ»¸ömemo½«ÎĵµÖеÄÄÚÈݶÁÈë,µÚ¶þ¸ömemo½«µÚÒ»¸ömemoÖеÄÄÚÈÝ·Ö½â³É¼¸ÐÐ.
ÈçÉÏÃæµÄÀý×Ӿͻá±ä³É:
20100112_164910 
6
81406392
808
113
½ÓÏÂÀ´µÄÊÂÇé¾Í±äµÃ±È½Ï¼òµ¥ÁË.µ±È»ÕâÀïÃæÑ­»·Êǿ϶¨ÉÙ²»Á˵ÄÁË.
ÏÂÃæÊÇÈ«²¿´úÂë:
µÚÒ»²½:н¨Ò»¸ö´ø²ÎÊýµÄ¹ý³Ì: ²ÎÊýÊÇÎļþÃû
var
    F:text; 
procedure TForm1.Insert(FileName:string);
var
  s: string;
  i:integer;
begin
  AssignFile(F,FileName); //½«ÎļþµÄÄÚÈݶÁµ½FÖÐ
  Reset(F);
  Memo1.Clear;
  while not Eof(F) do
   begin
    Readln(F, s);       //ÔÙ½«FÖеÄÄÚÈݶÁµ½SÖÐ
    Memo1.Lines.Add(s); //½«ÄÚÈݼÓÈëmemoÖÐ
   end;
   CloseFile(F);
 if  memo1.Lines.Count>=1 then
 begin
   for i:=0 to memo1.Lines.Count-2 do
   begin
      if length(memo1.Lines[i])>4 then
      begin
      Memo2.Lines.Delimiter := ',';
      Memo2.Lines.DelimitedText := memo1.Lines[i];
       //ÏÂÃæÁ½¾äÊÇÒµÎñ´¦ÀíÓï¾ä,°ÑÏà¹ØµÄÄÚÈݲåÈë±íÖÐ
    &n


Ïà¹ØÎĵµ£º

ÓÃDelphi±àÖÆ¿É×Ô¶¯Éý¼¶³ÌÐò

ÔÚ±àÖÆÁËÒ»¸öÓ¦ÓóÌÐòºóµÄά»¤½×¶Î£¬ÎÒÃÇ»áÃæÁÙ¸øÓ¦ÓóÌÐòÉý¼¶µÄ¹¤×÷.ÎÞÒÉ£¬ÊÖ¹¤Éý¼¶µÄ¹¤×÷ÊÇÊ®·Ö·±ËöµÄ£¬Äã¿ÉÄÜ»áÐèÒªµ½Óû§µÄ»úÆ÷ÉÏÈ¥¸üÐÂÎļþ.¿ÉÊÇ£¬Èç¹ûÄܱàÒ»¸ö×Ô¶¯Éý¼¶³ÌÐò£¬·ÅÔÚÍøÂçÉÏ£¬ÈÃÓû§ÏÂÔØ£¬Ö»ÐèÖ´ÐÐһϾÍÍê³ÉÉý¼¶¹¤×÷£¬²»ÊǺܷ½±ãÂð£¿Æäʵ£¬ÓÃDelphi¿ÉÒԺܷ½±ãµØ±àÖƳöÕâÑùÒ»¸öµÄ³ÌÐò.
ÒÔÏÂÊÇÎÒÃǵÄÀý×Ó£ ......

Delphi²¿·Öº¯Êý¡¢ÃüÁî¡¢ÊôÐÔÖÐÎÄ˵Ã÷

×¢²áÂ룺6amd-pdj686-apme9d-9cdr
Ãܳףºyvx-27c
Delphi²¿·Öº¯Êý¡¢ÃüÁî¡¢ÊôÐÔÖÐÎÄ˵Ã÷
Abort º¯Êý ÒýÆð·ÅÆúµÄÒâÍâ´¦Àí
Abs º¯Êý ¾ø¶ÔÖµº¯Êý
AddExitProc º¯Êý ½«Ò»¹ý³ÌÌí¼Óµ½ÔËÐÐʱ¿âµÄ½áÊø¹ý³Ì±íÖÐ
Addr º¯Êý ·µ»ØÖ¸¶¨¶ÔÏóµÄµØÖ·
AdjustLineBreaks º¯Êý ½«¸ø¶¨×Ö·û´®µÄÐзָô·ûµ÷ÕûΪCR/LFÐòÁÐ
Align ÊôÐÔ Ê¹¿Ø¼þÎ ......

DelphiÖÐʹÓÃ@È¡º¯ÊýµØÖ·µÄÎÊÌâ

ÀýÈçÒÔÏ´úÂ룺
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs;
type
  TForm1 = class(TForm)
    procedure one();
    function two(x,y:integer):integer;
  private
    ......

ÓÃSPCOMM ÔÚ DelphiÖÐʵÏÖ´®¿ÚͨѶ

ÓÃDelphi ʵÏÖ´®¿ÚͨѶ£¬³£Óõļ¸ÖÖ·½·¨Îª£ºÊ¹ÓÿؼþÈçMSCOMMºÍSPCOMM£¬Ê¹ÓÃAPIº¯Êý»òÕßÔÚDelphi Öе÷ÓÃÆäËü´®¿ÚͨѶ³ÌÐò¡£ÀûÓÃAPI±àд´®¿ÚͨÐųÌÐò½ÏΪ¸´ÔÓ£¬ÐèÒªÕÆÎÕ´óÁ¿Í¨ÐÅ֪ʶ£¬ÆäÓŵãÊÇ¿ÉʵÏֵŦÄܸüÇ¿´ó£¬Ó¦ÓÃÃæ¸ü¹ã·º£¬¸üÊʺÏÓÚ±àд½ÏΪ¸´ÔÓ µÄµÍ²ã´ÎͨÐųÌÐò¡£Ïà±È½Ï¶øÑÔ£¬ÀûÓÃSPComm¿Ø¼þÔòÏà¶Ô½Ï¼òµ¥£¬¸Ã¿Ø¼þ¾ßÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ