Hello,
Has anyone successfully used mdx to query an olap cube? I am able to get to
the cube through coldfusion but can't get any output. Any suggstions?
Thanks,
Eddie
<body>
<cfset adOpenStatic = 3>
<cfset adLockReadOnly = 1>
<cfset adCmdText = 1>
<!--- Grab the component--->
<cfobject type="COM"
name="cst"
class="ADOMD.Cellset"
action="CREATE">
<!---This is where I now write the mdx expression--->
<cfset sMDX="SELECT TopCount({[Product].[Product Name].Members}, 1,
Measures.[Unit Sales]) ON COLUMNS FROM [Sales]">
<!---<cfset sMDX="SELECT ({[Measures].[MeasuresLevel].Members}) ON COLUMNS
FROM [The Cube]"> --->
<cfset cst = cst.open(sMDX,
"Provider=MSOLAP;Datasource=NHCNTMSSQL2000;Catalog=FoodMart;")>
<!---I have just added this to make sure that the variable is not empty. If
it is the page will stop--->
<cfif "CST" IS " ">
The variable is empty.
<cfabort showerror="The Template was aborted because the variable is an
empty string">
</cfif>
<!---The values should be listed here--->
<cfform name="mdx">
<font face="arial" size=4>
Results:<br><br><br>
</font>
<font face="arial" size="3">
<cfoutput>
#cst#<br>
</cfoutput></font>
<font face="arial" size=4>
Your mdx query is:<br></font><br>
<font face="arial" size="3">
<cfoutput>
#smdx#
</cfoutput></font>
</cfform>
</body>
</html>
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]