<?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>Ed&#039;s Place &#187; Access</title>
	<atom:link href="http://www.edfrancis.co.uk/category/databases/access/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edfrancis.co.uk</link>
	<description>The home of Ed&#039;s Rants and Raves since 2008!</description>
	<lastBuildDate>Sun, 22 Jan 2012 10:22:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Creating Pass-Through queries in Access 2003</title>
		<link>http://www.edfrancis.co.uk/2008/04/creating-pass-through-queries-in-access-2003/</link>
		<comments>http://www.edfrancis.co.uk/2008/04/creating-pass-through-queries-in-access-2003/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 12:41:08 +0000</pubDate>
		<dc:creator>Ed Francis</dc:creator>
				<category><![CDATA[Access]]></category>

		<guid isPermaLink="false">http://blog.mrfrancis.net/?p=12</guid>
		<description><![CDATA[A pass-through query is one where your command is passed from MS Access over to the server to execute. Sounds a little tricky, I know, but you&#8217;ll get the hang of it. OK, lets start with the scenario that you want to access a stored procedure (sometimes called a sproc) called sp_this_one on a SQL Server somewhere [...]]]></description>
			<content:encoded><![CDATA[<p>A pass-through query is one where your command is passed from MS Access over to the server to execute. Sounds a little tricky, I know, but you&#8217;ll get the hang of it.</p>
<p>OK, lets start with the scenario that you want to access a stored procedure (sometimes called a sproc) called sp_this_one on a SQL Server somewhere in your organisation.<br />
In order to run this sproc you&#8217;d normally issue the command <em>EXEC sp_this_one</em> in Query Analyser or some such tool.</p>
<p>In order to run this sproc in access, you just need to make a pass-through query with that exec statement. Easy as.</p>
<p>Assuming you&#8217;ve already set up a Data Source Name (or DSN) to your SQL Server&#8217;s database (don&#8217;t worry, I&#8217;ll be writing about how to do that in another post) the process is straightforward.</p>
<ol>
<li>Create a query</li>
<li>Close the Tables box</li>
<li>Go to the Query Menu</li>
<li>Select SQL Specific &gt; Pass-Through Query</li>
<li>Click the Properties button on the toolbar</li>
<li>ODBC Connection String</li>
<li>&#8230; button</li>
<li>Select data source</li>
</ol>
<p>And that&#8217;s it. All you need to do then is type into the query window the command you&#8217;d like to pass through to the server. In our case EXEC sp_this_one.</p>
<p>I realise I&#8217;ve been using some rather broad strokes in these instructions, please feel free to email me if you&#8217;d like a slightly better description.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.edfrancis.co.uk%2F2008%2F04%2Fcreating-pass-through-queries-in-access-2003%2F&amp;title=Creating%20Pass-Through%20queries%20in%20Access%202003" id="wpa2a_2"><img src="http://www.edfrancis.co.uk/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.edfrancis.co.uk/2008/04/creating-pass-through-queries-in-access-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

