var FileName: string;
List: TStrings;
ds, ic: string;
begin
FileName := 'C:\yourfilename.udl';
List := TStringList.Create;
try
List.Delimiter := ';';
List.StrictDelimiter := True;
List.LoadFromFile(FileName);
List.DelimitedText := List[2];
ds := List.Values['Data source'];
ic := List.Values['Initial catalog'];
ShowMessage(ds + ' ' + ic);
finally
List.Free;
end;
end;
|