p; end;
if (ele.TagName = ''UserID'') then
if ele.HasCharData then
begin
text := ele.GetFirstCharData;
UserID := trim(text.GetValue);
end;
if (ele.TagName = ''Password'') then
if ele.HasCharData then
begin
text := ele.GetFirstCharData;
Password := trim(text.GetValue);
end;
ele := ele.NextSibling;
end;
if length(Trim(UserID)) = 0 then
UserID := ''sa'';
if length(Trim(Provider)) = 0 then
Provider := ''SQLOLEDB.1'';
if length(Trim(initialcatalog)) = 0 then
initialcatalog := ''hszxdata'';
if length(Trim(DataSource)) = 0 then
DataSource := ''192.168.0.3'';
finally
doc.clear;
doc.Free;
end;
end;
function TConcfg.GetConnectString: string;
begin
result := ''Provider='' + provider + '';Password='' + password +
'';Persist Security Info=True;User ID='' + userid +
'';Initial Catalog='' + initialcatalog +
'';Data Source='' + DataSource;
end;
end.