A
a2236523
Unregistered / Unconfirmed
GUEST, unregistred user!
我要在一个ini文件中读出send_format,读出后要判断send_format中是否有%name%,或%birthday%,如有就要将%name%换回数据库employee表中的NAME字段,%birthday%则替换为今天日期!请问要怎么做?
procedure Tlf_srdx.FormCreate(Sender: TObject);
var
myinifile: TInifile;
begin
myinifile := TInifile.Create(ExtractFilePath(paramstr(0)) + 'config.ini');
if myinifile = nil then
begin
showmessage('打开config.ini出错');
end else
begin
edit1.text := myinifile.readstring('birthday', 'send_format', '');
myinifile.Destroy;
end;
end;
procedure Tlf_srdx.FormCreate(Sender: TObject);
var
myinifile: TInifile;
begin
myinifile := TInifile.Create(ExtractFilePath(paramstr(0)) + 'config.ini');
if myinifile = nil then
begin
showmessage('打开config.ini出错');
end else
begin
edit1.text := myinifile.readstring('birthday', 'send_format', '');
myinifile.Destroy;
end;
end;