USEGEAR

导航

搞笑的ini文件读取ReadSectionValues

用fdconnection自动生成连接文本,将其写入ini文件,用于程序的读写。ini文件见后面。

    Lfini.ReadSection('LocalConnection',lstrings);
    ShowMessage(lstrings.Text);
    Lfini.ReadSections(lstrings);
    ShowMessage(lstrings.Text);
    Lfini.ReadSectionValues('LocalConnection',lstrings);
    ShowMessage(lstrings.Text);
    Lfini.ReadString('LocalConnection','User_Name','err');

上面代码执行只有Lfini.ReadSections(lstrings);Lfini.ReadString('LocalConnection','User_Name','err');有结果值。其他是空值。你能告诉洒家为什么?死的心都有了。是否太搞笑

 

================================
[LocalConnection]
================================这一行是致命行,知道why了吧!
Database=E:\程序开发\Usegear_MVS\DB\USEGEARMVS.FDB
User_Name=SYSDBA
Password=*****
Protocol=TCPIP
Server=192.168.1.78
DriverID=FB

[RometeConnection]
================================
FireDAC info
================================
Tool = RAD Studio 10.3
FireDAC = 17.0.0 (Build 93731)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver FB ...
Brand = Firebird
Client version = 205059900
Client DLL name = C:\windows\SYSTEM32\fbclient.dll
================================
Session info
================================
Current catalog = 
Current schema = 
Server version = WI-V2.5.5.26952 Firebird 2.5
WI-V2.5.5.26952 Firebird 2.5/tcp (Usegear-PC)/P12
WI-V2.5.5.26952 Firebird 2.5/tcp (Usegear-PC)/P12

 

posted on 2020-10-07 11:33  USEGEAR  阅读(346)  评论(0编辑  收藏  举报