<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 03:22:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Brian Swan's Blog: Why Pass Parameters by Reference in the SQLSRV Driver?]]></title>
      <guid>http://www.phpdeveloper.org/news/15491</guid>
      <link>http://www.phpdeveloper.org/news/15491</link>
      <description><![CDATA[<p>
<i>Brian Swaan</i> has <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/11/23/why-pass-parameters-by-reference-in-the-sqlsrv-driver.aspx">a new post</a> to his blog talking about why you, in your SQL Server-based application, pass the parameters in by reference.
</p>
<blockquote>
Last week at <a href="http://jumpincamp.com/">JumpIn Camp</a> we spent quite a bit of time focusing on the <a href="http://sqlsrvphp.codeplex.com/">SQL Server Driver for PHP</a>. As developers worked to build SQL Server support into their applications, they had lots of questions about how both the <a href="http://msdn.microsoft.com/en-us/library/cc296152(SQL.90).aspx">SQLSRV</a> and <a href="http://msdn.microsoft.com/en-us/library/ff628175(SQL.90).aspx">PDO_SQLSRV</a> drivers work under the hood. One of the questions that came up was "When using the SQLSRV driver to execute parameterized queries, why do I have to pass parameters by reference?"
</blockquote>
<p>
He includes a simple code example to show this passing by reference - first without it on the call to sqlsrv_prepare (and the warning message it gives) then the more correct version of passing in the past parameter by reference. 
</p>
<blockquote>
The SQL Server Driver for PHP team understands that passing parameters by reference is not ideal. [...] With that said, the team is continuing to investigate solutions that would produce expected behavior without passing parameters by reference.
</blockquote>]]></description>
      <pubDate>Thu, 25 Nov 2010 09:15:22 -0600</pubDate>
    </item>
  </channel>
</rss>
