子
子弹
Unregistered / Unconfirmed
GUEST, unregistred user!
请帮我看看下面的代码哪儿错了:
procedure TfmDatabaseSet.SetDatabase;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_USERS;
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/DatabaseKind',true);
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/ServerName',true);
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/DatabaseName',true);
Reg.WriteString('DatabaseKind',Combobox1.text);
Reg.WriteString('ServerName',Edit4.text);
Reg.WriteString('DatabaseName',Edit5.text);
finally
Reg.Free;
end;
end;
提示写入注册表失败!
我希望能够创建一个SOFTWARE/HS/DatabaseSet的目录,在里面
写一些数据,要怎样写才可以。
procedure TfmDatabaseSet.SetDatabase;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_USERS;
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/DatabaseKind',true);
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/ServerName',true);
Reg.OpenKey('SOFTWARE/HS/DatabaseSet/DatabaseName',true);
Reg.WriteString('DatabaseKind',Combobox1.text);
Reg.WriteString('ServerName',Edit4.text);
Reg.WriteString('DatabaseName',Edit5.text);
finally
Reg.Free;
end;
end;
提示写入注册表失败!
我希望能够创建一个SOFTWARE/HS/DatabaseSet的目录,在里面
写一些数据,要怎样写才可以。