COM+中文件读写操作 在COM+中是不是不能进行磁盘文件读写操作,例如读写INI文件或读写TXT文件。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 怎么操作,我的程序中读取INI文件中的string总是反回空值,同样的代码在普通程序中运行就没有问题。能详细说说吗? 你贴出代码看看。可能跟你的Ini文件路径有关系吧,你先使用绝对路径试试。 绝对路径也试过了。读INI String代码如下:function ReadFromIniFile(const Section, Key: string): string;var iniFile: TIniFile; FileName: string; tempValue: string;begin// FileName := GetFilePath + cConfigFileName; FileName := cConfigFileName; iniFile := TIniFile.Create(FileName); try with iniFile do begin tempValue := ReadString(Section, Key, ''); Result := tempValue; end; finally iniFile.Free; end;end; win7客户端提示 interface not supported fastreport 主从表分组问题 登录窗体问题请教,谢谢,在线等 如何将SQL数据库中的图片显示到Image控件中? 求一算法!急! 回车代替tab的小问题! 一个关于控件DBGrid显示颜色的问题 如何判断 两次输入多个EDIT中的的数字相同 请问哪位高人可以告诉我怎样调用WIN32 API设置两个窗口分布在不同的显示器上//很急 怎么把dbcheckbox的标题显示在Fastreport做的报表中呀? 紧急求救!!!!在线等! 想弄个可以自己设计界面(根据数据库字段)的程序,没思路
可能跟你的Ini文件路径有关系吧,你先使用绝对路径试试。
function ReadFromIniFile(const Section, Key: string): string;
var
iniFile: TIniFile;
FileName: string;
tempValue: string;
begin
// FileName := GetFilePath + cConfigFileName;
FileName := cConfigFileName;
iniFile := TIniFile.Create(FileName);
try
with iniFile do begin
tempValue := ReadString(Section, Key, '');
Result := tempValue;
end;
finally
iniFile.Free;
end;
end;