<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MGRIMM.NET &#187; .NET</title>
	<atom:link href="http://mgrimm.net/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgrimm.net</link>
	<description>It's back, baby.</description>
	<lastBuildDate>Fri, 11 Sep 2009 16:37:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting Up an ADOMD.NET Project</title>
		<link>http://mgrimm.net/2009/05/12/setting-up-an-adomdnet-project/</link>
		<comments>http://mgrimm.net/2009/05/12/setting-up-an-adomdnet-project/#comments</comments>
		<pubDate>Wed, 13 May 2009 02:04:49 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://mgrimm.net/?p=14</guid>
		<description><![CDATA[I made my first foray into ADOMD.NET today. ADOMD.NET is the technology used to connect to SQL Server Analysis Services. It seemed to work pretty well. Here is the key to the castle:
using Microsoft.AnalysisServices.AdomdClient;

The first step is to make sure you have a login for the SSAS client. My server uses integrated Windows security, so [...]]]></description>
			<content:encoded><![CDATA[<p>I made my first foray into <a href="http://msdn.microsoft.com/en-us/library/ms123483.aspx">ADOMD.NET</a> today. ADOMD.NET is the technology used to connect to SQL Server Analysis Services. It seemed to work pretty well. Here is the key to the castle:</p>
<p><code>using Microsoft.AnalysisServices.AdomdClient;<br />
</code></p>
<p>The first step is to make sure you have a login for the SSAS client. My server uses integrated Windows security, so I had to tack on the &#8220;<code>Integrated Security=SSPI;</code>&#8221; modifier to the end of the connection string.</p>
<p><code>AdomdConnection conn = new AdomdConnection("Data Source=THE_SERVER;Initial Catalog=THE_DB;Integrated Security=SSPI;");</code></p>
<p>Next up, open the connection and set up an ADOMD command with which to submit your <a href="http://msdn.microsoft.com/en-us/library/aa216767(SQL.80).aspx">MDX</a> query:</p>
<p><code>conn.Open();<br />
AdomdCommand cmd = new AdomdCommand(@"SELECT [Measures].[Count] ON COLUMNS, [Geography].[Geo].[All] ON ROWS<br />
FROM [DBNAME]", conn);</code></p>
<p>Use this command to fill a <code>CellSet</code>:</p>
<p><code>CellSet cs = cmd.ExecuteCellSet();</code></p>
<p>After this we can start slicing and dicing down to get the exact tuples we want. I recommend first creating a <code>TupleCollection</code>:</p>
<p><code>TupleCollection tuplesOnColumns = cs.Axes[0].Set.Tuples;</code></p>
<p>The <code>cs.Axes[0].Set.Tuples</code> refers to columns, whereas <code>cs.Axes[1].Set.Tuples</code> would refer to rows. I think this is a good stopping point, I&#8221;ll continue this later.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgrimm.net/2009/05/12/setting-up-an-adomdnet-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
