我有一个.txt文件里面的格式为
名称                        类型         说明
----------------------------------------------------------------------------------
Abort                       函数         引起放弃的意外处理 
Abs                         函数         绝对值函数 
AddExitProc                 函数         将一过程添加到运行时库的结束过程表中 
Addr                        函数         返回指定对象的地址 
AdjustLineBreaks            函数         将给定字符串的行分隔符调整为CR/LF序列 
Align                       属性         使控件位于窗口某部分 
Alignment                   属性         控件标签的文字位置 
AllocMem                    函数         在堆栈上分配给定大小的块 
我想将他导入到SQL中该怎么办?

解决方案 »

  1.   

    楼主可以自己写语句
    const
      Index_Place: array[1..3] of Integer = (1, 38, 51);
    var
      sFuncName, sType, sNote: string;
      S: string;
      F: TextFile;
    begin
      AssignFile(F, 'Test.Txt');
      Reset(F);
      //Abort                       函数         引起放弃的意外处理
      //012345678901234567890123456789012345678901234567890123456789
      while not Eof(F) do
      begin
        ReadLn(F, S);
        sFuncName := Copy(S, Index_Place[1],
                          Index_Place[2] - Index_Place[1]);
        sType     := Copy(S, Index_Place[2],
                          Index_Place[3] - Index_Place[2]);
        sNote     := Copy(S, Index_Place[3], MaxInt);
        //插入...
      end;
    end;
      

  2.   

    好象用OpenDataSource也可以做到