Hvis du bruger OpenRowset
i stedet for OpenQuery
, kan du angive forbindelsesparametrene dynamisk som en streng:
select *
from OpenRowset('MSOLAP',
'Data Source=localhost;Initial Catalog=xxxx;Provider=MSOLAP.4;Integrated Security=SSPI;Format=Tabular;',
'WITH MEMBER measures.X AS dimensions.count
SELECT Measures.X ON 0 FROM MyCube')