From unit: ADODB
 
procedure CreateUDLFile(const FileName, ProviderName, DataSourceName: WideString);
const
  ConnStrTemplate = 'Provider=%s;Data Source=%s'; { Do not localize }
var
  ConnStr: WideString;
  DataInit: IDataInitialize;
begin
  DataInit := CreateComObject(CLSID_DataLinks) as IDataInitialize;
  ConnStr := Format(ConnStrTemplate, [ProviderName, DataSourceName]);
  OleCheck(DataInit.WriteStringToStorage(PWideChar(FileName),
              PWideChar(ConnStr), CREATE_NEW));
end;