如下面的INI:
[AA]
ETC_SQL=Select * 
          From Customer
ETC_SQL部分的内容有时很长,会分成几行,我读的时候只能读出'Select *',有什么办法可以让它全部读出?(当然上面写的ETC_SQL很短,可以写成一行,但这是我简写出的例子,实际有很多SQL语句是很长的。必须分几行来写。)

解决方案 »

  1.   

    先将sql语句写好,然后将所有的回车换行全部替换为空格,在ctrl+v到ETC_SQL后面就可以了
      

  2.   

    问题是这个INI文件是提供给人手工写的。
      

  3.   

    FindBuf := 'select sum(summoney) as summoney ,convert(char(10),iodate,21) as iodate from iomaster'  ;
    FindBuf := FindBuf + ' where datename(year,iodate) =''' + yearedit.Text + '''' ;
    FindBuf := FindBuf + ' and datepart(mm,iodate) = ''' + monthbox.Text +'''';
    FindBuf := FindBuf + ' group by convert(char(10),iodate,21)' ;
    我一般这么写!
      

  4.   

    可以这样写INI文件
    ETC_SQL1=Select * From Customer
    ETC_SQL2=where 
    ETC_SQL3=1>2
    ETC_SQLn=...
    读之前判断这个小结里的项数
    循环好了
    --------------
    或者干脆就写成文本吗
    ETC_SQL1=文件名
    加载文件
      

  5.   

    各位,我有个想法,就是继承TINIFILE,重写它的读取Section代码来达到这个目的,但是改写代码方面还请各位指教?