<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>SQLSRVPHP Work Item Rss Feed</title><link>http://www.codeplex.com/SQLSRVPHP/WorkItem/List.aspx</link><description>SQLSRVPHP Work Item Rss Description</description><item><title>Created Unassigned: Cannot use transactions if there are any open recordsets [22420]</title><link>http://sqlsrvphp.codeplex.com/workitem/22420</link><description>It seems that SQL Server does not allow more than one recordset to be opened at the same time. So any code doing the something like this will fail&amp;#58;&lt;br /&gt;- open recordset&lt;br /&gt;- open recordset&lt;br /&gt;&lt;br /&gt;To solve that limitation the &amp;#34;Multiple Active Result Sets&amp;#34; mode &amp;#40;MARS&amp;#41; was created and the combination above started to work.&lt;br /&gt;&lt;br /&gt;But the MARS mode has some limitations about what can and what cannot be done. One of these is that we cannot use transactions if there are any open recordsets. That means that any code doing the following will fail&amp;#58;&lt;br /&gt;- open recordset&lt;br /&gt;- start transaction&lt;br /&gt;&lt;br /&gt;Is there any way to get around this&amp;#63;&lt;br /&gt;</description><author>luisdev</author><pubDate>Fri, 07 Jun 2013 11:09:11 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Cannot use transactions if there are any open recordsets [22420] 20130607110911A</guid></item><item><title>Commented Issue: Cannot backup a database and retrieve multiple results in one statement [22419]</title><link>http://sqlsrvphp.codeplex.com/workitem/22419</link><description>In our application, we need to be able to backup a database from PHP and also retrieve data from SELECTs in the same statement. Actually, we run all this code in a Stored Procedure in SQL Server 2008 but we were able to reproduce the same exact problem with a simple query. Our application is made to work in UTF-8 and display html using this encoding. What happens here is that PHP is crashing in this particular case, which is very bad. We found out that if we remove &amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;, the issue is gone, the database gets backed up and data is returned &amp;#40;but I guess utf-8 strings are messed up if any&amp;#41; and we think it has something to do with UTF-8 encoding of error messages, as reported in a Stackoverflow question here &amp;#40;which I also commented&amp;#41; &amp;#58; http&amp;#58;&amp;#47;&amp;#47;stackoverflow.com&amp;#47;questions&amp;#47;9621858&amp;#47;sqlsrv-php-driver-and-utf-8-encoding-issue-with-error-messages&lt;br /&gt;&lt;br /&gt;Here is the source code to reproduce the error &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#60;&amp;#63;php&lt;br /&gt;sqlsrv_configure&amp;#40;&amp;#39;WarningsReturnAsErrors&amp;#39;, 0&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;result &amp;#61; array&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;connInfo &amp;#61; array&amp;#40;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;Database&amp;#34;&amp;#61;&amp;#62;&amp;#34;myDB&amp;#34;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;UID&amp;#34;&amp;#61;&amp;#62;&amp;#34;sa&amp;#34;, &amp;#47;&amp;#47; using sa to demonstrate it&amp;#39;s not a permission issue&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;PWD&amp;#34;&amp;#61;&amp;#62;&amp;#34;saPassword&amp;#34;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;APP&amp;#39; &amp;#61;&amp;#62; &amp;#39;MyApp&amp;#39;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;LoginTimeout&amp;#39; &amp;#61;&amp;#62; 5,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;MultipleActiveResultSets&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;ReturnDatesAsStrings&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;&lt;br /&gt;&amp;#9;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;conn &amp;#61; sqlsrv_connect&amp;#40;&amp;#39;myserverhost&amp;#39;, &amp;#36;connInfo&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;query &amp;#61; &amp;#34;BACKUP DATABASE &amp;#91;SomeDB&amp;#93; &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;TO DISK &amp;#61; &amp;#39;C&amp;#58;&amp;#92;&amp;#92;Backup&amp;#92;&amp;#92;test_backup.bak&amp;#39;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;WITH&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOFORMAT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;INIT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NAME &amp;#61; &amp;#39;super backup&amp;#39;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOREWIND, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOUNLOAD, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SKIP&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 1&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 2&amp;#59;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;stmt &amp;#61; sqlsrv_prepare&amp;#40;&amp;#36;conn, &amp;#36;query&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_execute&amp;#40; &amp;#36;stmt &amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch first result set&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;row &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; &amp;#36;row&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch all next result sets&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;rs &amp;#61; sqlsrv_next_result&amp;#40;&amp;#36;stmt&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_free_stmt&amp;#40;&amp;#36;stmt&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;sqlsrv_close&amp;#40;&amp;#36;conn&amp;#41;&amp;#59;&lt;br /&gt;&amp;#63;&amp;#62;&lt;br /&gt;&lt;br /&gt;If more details are needed I can provide them.&lt;br /&gt;&lt;br /&gt;Hope the issue gets resolved soon&lt;br /&gt;Comments: Here is what is returned by sqlsrv_client_info &amp;#58;&amp;#10;&amp;#10;Array &amp;#40; &amp;#91;DriverDllName&amp;#93; &amp;#61;&amp;#62; sqlncli11.dll &amp;#91;DriverODBCVer&amp;#93; &amp;#61;&amp;#62; 03.80 &amp;#91;DriverVer&amp;#93; &amp;#61;&amp;#62; 11.00.2100 &amp;#91;ExtensionVer&amp;#93; &amp;#61;&amp;#62; 3.0.3421.0 &amp;#41;&amp;#10;&amp;#10;And this is what comes from sqlsrv_server_info &amp;#58;&amp;#10;&amp;#10;Array &amp;#40; &amp;#91;CurrentDatabase&amp;#93; &amp;#61;&amp;#62; myDB &amp;#91;SQLServerVersion&amp;#93; &amp;#61;&amp;#62; 10.00.5500 &amp;#91;SQLServerName&amp;#93; &amp;#61;&amp;#62; myserverhost&amp;#41;&amp;#10;&amp;#10;Yes I know that messages are not retrieved by sqlsrv_fetch_array, and I&amp;#39;m not really interested in retrieving them, but what happens here, is that it makes PHP crash. What makes PHP actually crash is the second call to sqlsrv_next_result &amp;#40;in the while loop&amp;#41; and we don&amp;#39;t really explain it, so we think it&amp;#39;s a bug.&amp;#10;&amp;#10;We run Zend Server 5.6 &amp;#40;PHP 5.3.14&amp;#41; on Windows Server 2008 R2 Standard Edition Service Pack 1</description><author>MaxiWheat</author><pubDate>Tue, 11 Dec 2012 15:29:36 GMT</pubDate><guid isPermaLink="false">Commented Issue: Cannot backup a database and retrieve multiple results in one statement [22419] 20121211032936P</guid></item><item><title>Commented Issue: Cannot backup a database and retrieve multiple results in one statement [22419]</title><link>http://sqlsrvphp.codeplex.com/workitem/22419</link><description>In our application, we need to be able to backup a database from PHP and also retrieve data from SELECTs in the same statement. Actually, we run all this code in a Stored Procedure in SQL Server 2008 but we were able to reproduce the same exact problem with a simple query. Our application is made to work in UTF-8 and display html using this encoding. What happens here is that PHP is crashing in this particular case, which is very bad. We found out that if we remove &amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;, the issue is gone, the database gets backed up and data is returned &amp;#40;but I guess utf-8 strings are messed up if any&amp;#41; and we think it has something to do with UTF-8 encoding of error messages, as reported in a Stackoverflow question here &amp;#40;which I also commented&amp;#41; &amp;#58; http&amp;#58;&amp;#47;&amp;#47;stackoverflow.com&amp;#47;questions&amp;#47;9621858&amp;#47;sqlsrv-php-driver-and-utf-8-encoding-issue-with-error-messages&lt;br /&gt;&lt;br /&gt;Here is the source code to reproduce the error &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#60;&amp;#63;php&lt;br /&gt;sqlsrv_configure&amp;#40;&amp;#39;WarningsReturnAsErrors&amp;#39;, 0&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;result &amp;#61; array&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;connInfo &amp;#61; array&amp;#40;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;Database&amp;#34;&amp;#61;&amp;#62;&amp;#34;myDB&amp;#34;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;UID&amp;#34;&amp;#61;&amp;#62;&amp;#34;sa&amp;#34;, &amp;#47;&amp;#47; using sa to demonstrate it&amp;#39;s not a permission issue&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;PWD&amp;#34;&amp;#61;&amp;#62;&amp;#34;saPassword&amp;#34;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;APP&amp;#39; &amp;#61;&amp;#62; &amp;#39;MyApp&amp;#39;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;LoginTimeout&amp;#39; &amp;#61;&amp;#62; 5,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;MultipleActiveResultSets&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;ReturnDatesAsStrings&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;&lt;br /&gt;&amp;#9;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;conn &amp;#61; sqlsrv_connect&amp;#40;&amp;#39;myserverhost&amp;#39;, &amp;#36;connInfo&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;query &amp;#61; &amp;#34;BACKUP DATABASE &amp;#91;SomeDB&amp;#93; &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;TO DISK &amp;#61; &amp;#39;C&amp;#58;&amp;#92;&amp;#92;Backup&amp;#92;&amp;#92;test_backup.bak&amp;#39;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;WITH&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOFORMAT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;INIT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NAME &amp;#61; &amp;#39;super backup&amp;#39;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOREWIND, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOUNLOAD, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SKIP&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 1&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 2&amp;#59;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;stmt &amp;#61; sqlsrv_prepare&amp;#40;&amp;#36;conn, &amp;#36;query&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_execute&amp;#40; &amp;#36;stmt &amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch first result set&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;row &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; &amp;#36;row&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch all next result sets&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;rs &amp;#61; sqlsrv_next_result&amp;#40;&amp;#36;stmt&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_free_stmt&amp;#40;&amp;#36;stmt&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;sqlsrv_close&amp;#40;&amp;#36;conn&amp;#41;&amp;#59;&lt;br /&gt;&amp;#63;&amp;#62;&lt;br /&gt;&lt;br /&gt;If more details are needed I can provide them.&lt;br /&gt;&lt;br /&gt;Hope the issue gets resolved soon&lt;br /&gt;Comments: What version of the driver are you using&amp;#63;  I tried something similar to your code in Japanese, German, Russian and English and they all worked, with the correct encoding, and with your SELECT statements at the end.  &amp;#10;&amp;#10;Do you know that the sqlsrv warning messages are &amp;#42;not&amp;#42; retrieved using sqlsrv_fetch_array&amp;#63;&amp;#10;&amp;#10;If you need more help, please ask a question on the forum&amp;#58; &amp;#10;http&amp;#58;&amp;#47;&amp;#47;social.msdn.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;sqldriverforphp&amp;#47;threads&amp;#10;&amp;#10;There is a post in the forum about how to do a plain backup&amp;#58;&amp;#10;http&amp;#58;&amp;#47;&amp;#47;social.msdn.microsoft.com&amp;#47;Forums&amp;#47;da&amp;#47;sqldriverforphp&amp;#47;thread&amp;#47;e0908b2f-4afa-4626-830d-9683486186c8</description><author>robertjohnson</author><pubDate>Tue, 11 Dec 2012 10:40:21 GMT</pubDate><guid isPermaLink="false">Commented Issue: Cannot backup a database and retrieve multiple results in one statement [22419] 20121211104021A</guid></item><item><title>Created Issue: Cannot backup a database and retrieve multiple results in one statement [22419]</title><link>http://sqlsrvphp.codeplex.com/workitem/22419</link><description>In our application, we need to be able to backup a database from PHP and also retrieve data from SELECTs in the same statement. Actually, we run all this code in a Stored Procedure in SQL Server 2008 but we were able to reproduce the same exact problem with a simple query. Our application is made to work in UTF-8 and display html using this encoding. What happens here is that PHP is crashing in this particular case, which is very bad. We found out that if we remove &amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;, the issue is gone, the database gets backed up and data is returned &amp;#40;but I guess utf-8 strings are messed up if any&amp;#41; and we think it has something to do with UTF-8 encoding of error messages, as reported in a Stackoverflow question here &amp;#40;which I also commented&amp;#41; &amp;#58; http&amp;#58;&amp;#47;&amp;#47;stackoverflow.com&amp;#47;questions&amp;#47;9621858&amp;#47;sqlsrv-php-driver-and-utf-8-encoding-issue-with-error-messages&lt;br /&gt;&lt;br /&gt;Here is the source code to reproduce the error &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#60;&amp;#63;php&lt;br /&gt;sqlsrv_configure&amp;#40;&amp;#39;WarningsReturnAsErrors&amp;#39;, 0&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;result &amp;#61; array&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;connInfo &amp;#61; array&amp;#40;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;Database&amp;#34;&amp;#61;&amp;#62;&amp;#34;myDB&amp;#34;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;UID&amp;#34;&amp;#61;&amp;#62;&amp;#34;sa&amp;#34;, &amp;#47;&amp;#47; using sa to demonstrate it&amp;#39;s not a permission issue&lt;br /&gt;&amp;#9;&amp;#9;&amp;#34;PWD&amp;#34;&amp;#61;&amp;#62;&amp;#34;saPassword&amp;#34;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;APP&amp;#39; &amp;#61;&amp;#62; &amp;#39;MyApp&amp;#39;,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;LoginTimeout&amp;#39; &amp;#61;&amp;#62; 5,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;MultipleActiveResultSets&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;ReturnDatesAsStrings&amp;#39; &amp;#61;&amp;#62; true,&lt;br /&gt;&amp;#9;&amp;#9;&amp;#39;CharacterSet&amp;#39; &amp;#61;&amp;#62; &amp;#39;UTF-8&amp;#39;&lt;br /&gt;&amp;#9;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#36;conn &amp;#61; sqlsrv_connect&amp;#40;&amp;#39;myserverhost&amp;#39;, &amp;#36;connInfo&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;query &amp;#61; &amp;#34;BACKUP DATABASE &amp;#91;SomeDB&amp;#93; &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;TO DISK &amp;#61; &amp;#39;C&amp;#58;&amp;#92;&amp;#92;Backup&amp;#92;&amp;#92;test_backup.bak&amp;#39;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;WITH&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOFORMAT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;INIT, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NAME &amp;#61; &amp;#39;super backup&amp;#39;, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOREWIND, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;NOUNLOAD, &lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SKIP&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 1&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;SELECT 2&amp;#59;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#36;stmt &amp;#61; sqlsrv_prepare&amp;#40;&amp;#36;conn, &amp;#36;query&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_execute&amp;#40; &amp;#36;stmt &amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch first result set&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;row &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; &amp;#36;row&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47; Fetch all next result sets&lt;br /&gt;&amp;#9;while&amp;#40;&amp;#36;rs &amp;#61; sqlsrv_next_result&amp;#40;&amp;#36;stmt&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;result&amp;#91;&amp;#93; &amp;#61; sqlsrv_fetch_array&amp;#40; &amp;#36;stmt, SQLSRV_FETCH_ASSOC&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&lt;br /&gt;&amp;#9;sqlsrv_free_stmt&amp;#40;&amp;#36;stmt&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;sqlsrv_close&amp;#40;&amp;#36;conn&amp;#41;&amp;#59;&lt;br /&gt;&amp;#63;&amp;#62;&lt;br /&gt;&lt;br /&gt;If more details are needed I can provide them.&lt;br /&gt;&lt;br /&gt;Hope the issue gets resolved soon&lt;br /&gt;</description><author>MaxiWheat</author><pubDate>Mon, 10 Dec 2012 18:56:09 GMT</pubDate><guid isPermaLink="false">Created Issue: Cannot backup a database and retrieve multiple results in one statement [22419] 20121210065609P</guid></item><item><title>Commented Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418]</title><link>http://sqlsrvphp.codeplex.com/workitem/22418</link><description>Hi,&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;i have a table with an insert trigger defined. I made an insert on this table and want to get the inserted id. So i made this&amp;#58;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;sql &amp;#61; &amp;#39;INSERT INTO &amp;#34;content&amp;#34; &amp;#40;&amp;#34;parent&amp;#34;, &amp;#34;name&amp;#34;, &amp;#34;content&amp;#34;, &amp;#34;created_by&amp;#34;, &amp;#34;changed_by&amp;#34;, &amp;#34;create_date&amp;#34;, &amp;#34;change_date&amp;#34;&amp;#41; VALUES &amp;#40;&amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;&amp;#41; SELECT SCOPE_IDENTITY&amp;#40;&amp;#41; as Current_Identity&amp;#39;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;params &amp;#61; array&amp;#40;1, &amp;#39;TTTTTTTTTTTTT&amp;#39;, &amp;#39;TTTTTTTTTTTTT&amp;#39;, 0, 0, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;&amp;#41;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;stmt &amp;#61; sqlsrv_query&amp;#40; &amp;#36;conn, &amp;#36;sql, &amp;#36;params&amp;#41;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;To get the Current_Identity i need to make two sqlsrv_next_result. If i delete the trigger it works with only one sqlsrv_next_result.&amp;#60;br &amp;#47;&amp;#62;This sounds like a bug for me.&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;Attached is an example script.&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;I used php 5.4 with sqlsrv 3.0.1&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;regards,&amp;#60;br &amp;#47;&amp;#62;Frank&lt;br /&gt;Comments: Hi,&amp;#13;&amp;#10;&amp;#13;&amp;#10;i solved my problem with SQL NOCOUNT.&amp;#13;&amp;#10;See&amp;#58; http&amp;#58;&amp;#47;&amp;#47;social.technet.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;sqldriverforphp&amp;#47;thread&amp;#47;5ae29309-bb15-4a02-971e-17387f8a2821&amp;#13;&amp;#10;&amp;#13;&amp;#10;But if i see other database systems the behaviour is different here. So it sounds like a bug first and my solution is tricky.&amp;#13;&amp;#10;&amp;#13;&amp;#10;For me it is a bug</description><author>lordlamer</author><pubDate>Thu, 06 Dec 2012 08:45:55 GMT</pubDate><guid isPermaLink="false">Commented Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418] 20121206084555A</guid></item><item><title>Edited Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418]</title><link>http://sqlsrvphp.codeplex.com/workitem/22418</link><description>Hi,&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;i have a table with an insert trigger defined. I made an insert on this table and want to get the inserted id. So i made this&amp;#58;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;sql &amp;#61; &amp;#39;INSERT INTO &amp;#34;content&amp;#34; &amp;#40;&amp;#34;parent&amp;#34;, &amp;#34;name&amp;#34;, &amp;#34;content&amp;#34;, &amp;#34;created_by&amp;#34;, &amp;#34;changed_by&amp;#34;, &amp;#34;create_date&amp;#34;, &amp;#34;change_date&amp;#34;&amp;#41; VALUES &amp;#40;&amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;&amp;#41; SELECT SCOPE_IDENTITY&amp;#40;&amp;#41; as Current_Identity&amp;#39;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;params &amp;#61; array&amp;#40;1, &amp;#39;TTTTTTTTTTTTT&amp;#39;, &amp;#39;TTTTTTTTTTTTT&amp;#39;, 0, 0, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;&amp;#41;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;&amp;#36;stmt &amp;#61; sqlsrv_query&amp;#40; &amp;#36;conn, &amp;#36;sql, &amp;#36;params&amp;#41;&amp;#59;&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;To get the Current_Identity i need to make two sqlsrv_next_result. If i delete the trigger it works with only one sqlsrv_next_result.&amp;#60;br &amp;#47;&amp;#62;This sounds like a bug for me.&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;Attached is an example script.&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;I used php 5.4 with sqlsrv 3.0.1&amp;#60;br &amp;#47;&amp;#62;&amp;#60;br &amp;#47;&amp;#62;regards,&amp;#60;br &amp;#47;&amp;#62;Frank&lt;br /&gt;</description><author>lordlamer</author><pubDate>Thu, 06 Dec 2012 08:45:55 GMT</pubDate><guid isPermaLink="false">Edited Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418] 20121206084555A</guid></item><item><title>Created Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418]</title><link>http://sqlsrvphp.codeplex.com/workitem/22418</link><description>Hi,&lt;br /&gt;&lt;br /&gt;i have a table with an insert trigger defined. I made an insert on this table and want to get the inserted id. So i made this&amp;#58;&lt;br /&gt;&amp;#36;sql &amp;#61; &amp;#39;INSERT INTO &amp;#34;content&amp;#34; &amp;#40;&amp;#34;parent&amp;#34;, &amp;#34;name&amp;#34;, &amp;#34;content&amp;#34;, &amp;#34;created_by&amp;#34;, &amp;#34;changed_by&amp;#34;, &amp;#34;create_date&amp;#34;, &amp;#34;change_date&amp;#34;&amp;#41; VALUES &amp;#40;&amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;, &amp;#63;&amp;#41; SELECT SCOPE_IDENTITY&amp;#40;&amp;#41; as Current_Identity&amp;#39;&amp;#59;&lt;br /&gt;&amp;#36;params &amp;#61; array&amp;#40;1, &amp;#39;TTTTTTTTTTTTT&amp;#39;, &amp;#39;TTTTTTTTTTTTT&amp;#39;, 0, 0, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;, &amp;#39;20121128 20&amp;#58;01&amp;#58;57&amp;#39;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#36;stmt &amp;#61; sqlsrv_query&amp;#40; &amp;#36;conn, &amp;#36;sql, &amp;#36;params&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;To get the Current_Identity i need to make two sqlsrv_next_result. If i delete the trigger it works with only one sqlsrv_next_result.&lt;br /&gt;This sounds like a bug for me.&lt;br /&gt;&lt;br /&gt;Attached is an example script.&lt;br /&gt;&lt;br /&gt;I used php 5.4 with sqlsrv 3.0.1&lt;br /&gt;&lt;br /&gt;regards,&lt;br /&gt;Frank&lt;br /&gt;</description><author>lordlamer</author><pubDate>Fri, 30 Nov 2012 09:57:58 GMT</pubDate><guid isPermaLink="false">Created Issue: Problem with sqlsrv_next_result/lastinsertid after insert on table with trigger [22418] 20121130095758A</guid></item><item><title>Closed Issue: Encoding Hash Table - Zend Hash Table error [21609]</title><link>http://sqlsrvphp.codeplex.com/workitem/21609</link><description>The following errors are occuring when at least two users tries to query a SQL Server 2005 database using sqlsrv &amp;#40;php_sqlsrv_52_ts_vc6.dll&amp;#41; with php 5.2.9 and apache 2.2 AT THE SAME TIME &amp;#40;same functionality&amp;#41;. Sometimes it works, sometimes it breaks... &lt;br /&gt;&lt;br /&gt;- An error occurred creating or accessing a Zend hash table&lt;br /&gt;- Fatal&amp;#58; Error retrieving encoding from encoding hash table&lt;br /&gt;Comments: Closing since the user found a solution.  The problem was likely related to their usage of SQL Server itself.</description><author>icosahedron</author><pubDate>Tue, 30 Oct 2012 17:59:33 GMT</pubDate><guid isPermaLink="false">Closed Issue: Encoding Hash Table - Zend Hash Table error [21609] 20121030055933P</guid></item><item><title>Created Issue: PHP sqlsrv 3.0.1 Driver: sqlsrv_field_metadata returns column name as char*, so unicode column names can't be fetched correctly [22417]</title><link>http://sqlsrvphp.codeplex.com/workitem/22417</link><description>Customer uses unicode column names&amp;#58;&lt;br /&gt;&lt;br /&gt;CREATE TABLE Greek&lt;br /&gt;&amp;#40;&lt;br /&gt;&amp;#91;γεια σας κόσμο&amp;#93; &amp;#91;nvarchar&amp;#93;&amp;#40;100&amp;#41; NOT NULL,&lt;br /&gt;&amp;#91;привет мир&amp;#93; &amp;#91;nvarchar&amp;#93;&amp;#40;100&amp;#41; NOT NULL,&lt;br /&gt;&amp;#91;こんにちは世界&amp;#93; &amp;#91;nvarchar&amp;#93;&amp;#40;100&amp;#41; NOT NULL&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;calling sqlsrv_field_metadata converts names to ANSI char strings&amp;#58;&lt;br /&gt;&lt;br /&gt;Result 3 Row 2&amp;#58;Array&lt;br /&gt;&amp;#40;&lt;br /&gt;&amp;#91;0&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#91;&amp;#63;e&amp;#63;a sa&amp;#63; &amp;#63;&amp;#63;s&amp;#65533;&amp;#63;&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#91;1&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#91;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#63; &amp;#63;&amp;#63;&amp;#63;&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#91;2&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#91;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#63;&amp;#93; &amp;#61;&amp;#62; hello world&lt;br /&gt;&amp;#41;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here are some of the source code changes we would need to make to fix this&amp;#58;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Core_sqlsrv.h&amp;#58;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    sqlsrv_malloc_auto_ptr&amp;#60;SQLCHAR&amp;#62; field_name&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#8230;change to&amp;#58;&lt;br /&gt;&lt;br /&gt;    sqlsrv_malloc_auto_ptr&amp;#60;SQLWCHAR&amp;#62; field_name&amp;#59;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;core_stmt.cpp&amp;#58;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    meta_data-&amp;#62;field_name &amp;#61; static_cast&amp;#60;SQLCHAR&amp;#42;&amp;#62;&amp;#40; sqlsrv_malloc&amp;#40; SS_MAXCOLNAMELEN &amp;#43; 1 &amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;    try &amp;#123;&lt;br /&gt;&lt;br /&gt;        core&amp;#58;&amp;#58;SQLDescribeCol&amp;#40; stmt, colno &amp;#43; 1, meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41;, SS_MAXCOLNAMELEN, &amp;#38;field_name_len, &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&amp;#8230;change to&amp;#58;&lt;br /&gt;&lt;br /&gt;    meta_data-&amp;#62;field_name &amp;#61; static_cast&amp;#60;SQLWCHAR&amp;#42;&amp;#62;&amp;#40; sqlsrv_malloc&amp;#40; SS_MAXCOLNAMELEN &amp;#43; 1 &amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;    try &amp;#123;&lt;br /&gt;&lt;br /&gt;        core&amp;#58;&amp;#58;SQLDescribeColW&amp;#40; stmt, colno &amp;#43; 1, meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41;, SS_MAXCOLNAMELEN, &amp;#38;field_name_len, &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;stmt.cpp&amp;#58;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;        core&amp;#58;&amp;#58;sqlsrv_add_assoc_string&amp;#40; &amp;#42;stmt, field_array, FieldMetaData&amp;#58;&amp;#58;NAME, &lt;br /&gt;&lt;br /&gt;                                       reinterpret_cast&amp;#60;char&amp;#42;&amp;#62;&amp;#40; core_meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41; &amp;#41;, 0 TSRMLS_CC &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#8230;change to&amp;#58;&lt;br /&gt;&lt;br /&gt;        core&amp;#58;&amp;#58;sqlsrv_add_assoc_string&amp;#40; &amp;#42;stmt, field_array, FieldMetaData&amp;#58;&amp;#58;NAME, &lt;br /&gt;&lt;br /&gt;                                       reinterpret_cast&amp;#60; wchar_t&amp;#42;&amp;#62;&amp;#40; core_meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41; &amp;#41;, 0 TSRMLS_CC &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Pdo_stmt.cpp&amp;#58;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    &amp;#47;&amp;#47; Set the name &lt;br /&gt;&lt;br /&gt;    column_data-&amp;#62;name &amp;#61; reinterpret_cast&amp;#60;char&amp;#42;&amp;#62;&amp;#40; core_meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#8230;change to&amp;#58;&lt;br /&gt;&lt;br /&gt;    column_data-&amp;#62;name &amp;#61; reinterpret_cast&amp;#60; wchar_t&amp;#42;&amp;#62;&amp;#40; core_meta_data-&amp;#62;field_name.get&amp;#40;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;</description><author>WRead</author><pubDate>Tue, 25 Sep 2012 20:17:27 GMT</pubDate><guid isPermaLink="false">Created Issue: PHP sqlsrv 3.0.1 Driver: sqlsrv_field_metadata returns column name as char*, so unicode column names can't be fetched correctly [22417] 20120925081727P</guid></item><item><title>Commented Issue: Encoding Hash Table - Zend Hash Table error [21609]</title><link>http://sqlsrvphp.codeplex.com/workitem/21609</link><description>The following errors are occuring when at least two users tries to query a SQL Server 2005 database using sqlsrv &amp;#40;php_sqlsrv_52_ts_vc6.dll&amp;#41; with php 5.2.9 and apache 2.2 AT THE SAME TIME &amp;#40;same functionality&amp;#41;. Sometimes it works, sometimes it breaks... &lt;br /&gt;&lt;br /&gt;- An error occurred creating or accessing a Zend hash table&lt;br /&gt;- Fatal&amp;#58; Error retrieving encoding from encoding hash table&lt;br /&gt;Comments: Hi, &amp;#10;&amp;#10;Do you happen to have a small snippet of &amp;#40;working&amp;#41; code to reproduce this problem&amp;#63;&amp;#10;&amp;#10;Thanks,&amp;#10;&amp;#10;Jonathan</description><author>jguerin</author><pubDate>Fri, 10 Aug 2012 18:02:09 GMT</pubDate><guid isPermaLink="false">Commented Issue: Encoding Hash Table - Zend Hash Table error [21609] 20120810060209P</guid></item><item><title>Commented Issue: PDOStatement execute error [22416]</title><link>http://sqlsrvphp.codeplex.com/workitem/22416</link><description>I am using PHP 5.4 &amp;#40;zend 5.6&amp;#41;, IIS 7.5,  and SQLSRV-PHP driver on my development machine. I tried inserting some data into SQL2008R2 database using the new driver but to my surprise every time i run execute&amp;#40;&amp;#41;, it inserts the same record twice. Below is my code&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#36;pdo  &amp;#61; new PDO&amp;#40;&amp;#34;sqlsrv&amp;#58;server&amp;#61;&amp;#40;local&amp;#41;&amp;#59;database&amp;#61;devDb&amp;#59;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;sql  &amp;#61; &amp;#34;insert into tblTest &amp;#40;name,ts&amp;#41; values&amp;#40;&amp;#58;name, &amp;#58;ts&amp;#41;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#36;stmt &amp;#61; &amp;#36;pdo-&amp;#62;prepare&amp;#40;&amp;#36;sql&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;args &amp;#61; array&amp;#40;&amp;#39;&amp;#58;name&amp;#39;&amp;#61;&amp;#62;&amp;#39;Some Value&amp;#39;,&amp;#39;&amp;#58;ts&amp;#39;&amp;#61;&amp;#62;microtime&amp;#40;true&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;if&amp;#40; &amp;#36;stmt-&amp;#62;execute&amp;#40;&amp;#36;args&amp;#41; &amp;#41;&amp;#123;&lt;br /&gt;    .....&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;When i run and check the db, it creates 2 records with a difference in the ts field of some few micro seconds. On my production system which is running PHP5.3, that is not an issue.&lt;br /&gt;Could it be a problem in the driver or PHP itself&lt;br /&gt;Comments: Hi,&amp;#10;&amp;#10;Customer support is unable to reproduce your issue. If you could go to the forums and post there, they would be able to gather more information from you.&amp;#10;&amp;#10;Thanks,&amp;#10;&amp;#10;Jonathan</description><author>jguerin</author><pubDate>Mon, 21 May 2012 15:01:32 GMT</pubDate><guid isPermaLink="false">Commented Issue: PDOStatement execute error [22416] 20120521030132P</guid></item><item><title>Commented Issue: PDOStatement execute error [22416]</title><link>http://sqlsrvphp.codeplex.com/workitem/22416</link><description>I am using PHP 5.4 &amp;#40;zend 5.6&amp;#41;, IIS 7.5,  and SQLSRV-PHP driver on my development machine. I tried inserting some data into SQL2008R2 database using the new driver but to my surprise every time i run execute&amp;#40;&amp;#41;, it inserts the same record twice. Below is my code&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#36;pdo  &amp;#61; new PDO&amp;#40;&amp;#34;sqlsrv&amp;#58;server&amp;#61;&amp;#40;local&amp;#41;&amp;#59;database&amp;#61;devDb&amp;#59;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;sql  &amp;#61; &amp;#34;insert into tblTest &amp;#40;name,ts&amp;#41; values&amp;#40;&amp;#58;name, &amp;#58;ts&amp;#41;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#36;stmt &amp;#61; &amp;#36;pdo-&amp;#62;prepare&amp;#40;&amp;#36;sql&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;args &amp;#61; array&amp;#40;&amp;#39;&amp;#58;name&amp;#39;&amp;#61;&amp;#62;&amp;#39;Some Value&amp;#39;,&amp;#39;&amp;#58;ts&amp;#39;&amp;#61;&amp;#62;microtime&amp;#40;true&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;if&amp;#40; &amp;#36;stmt-&amp;#62;execute&amp;#40;&amp;#36;args&amp;#41; &amp;#41;&amp;#123;&lt;br /&gt;    .....&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;When i run and check the db, it creates 2 records with a difference in the ts field of some few micro seconds. On my production system which is running PHP5.3, that is not an issue.&lt;br /&gt;Could it be a problem in the driver or PHP itself&lt;br /&gt;Comments: Hi quaspam,&amp;#10;&amp;#10;Could you please create a thread on the forums so that the support team can follow up with you&amp;#63; &amp;#10;&amp;#10;http&amp;#58;&amp;#47;&amp;#47;social.msdn.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;sqldriverforphp&amp;#47;threads&amp;#47;&amp;#10;&amp;#10;Thanks&amp;#33;&amp;#10;&amp;#10;Jonathan&amp;#10;</description><author>jguerin</author><pubDate>Fri, 18 May 2012 17:51:02 GMT</pubDate><guid isPermaLink="false">Commented Issue: PDOStatement execute error [22416] 20120518055102P</guid></item><item><title>Commented Issue: PDOStatement execute error [22416]</title><link>http://sqlsrvphp.codeplex.com/workitem/22416</link><description>I am using PHP 5.4 &amp;#40;zend 5.6&amp;#41;, IIS 7.5,  and SQLSRV-PHP driver on my development machine. I tried inserting some data into SQL2008R2 database using the new driver but to my surprise every time i run execute&amp;#40;&amp;#41;, it inserts the same record twice. Below is my code&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#36;pdo  &amp;#61; new PDO&amp;#40;&amp;#34;sqlsrv&amp;#58;server&amp;#61;&amp;#40;local&amp;#41;&amp;#59;database&amp;#61;devDb&amp;#59;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;sql  &amp;#61; &amp;#34;insert into tblTest &amp;#40;name,ts&amp;#41; values&amp;#40;&amp;#58;name, &amp;#58;ts&amp;#41;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#36;stmt &amp;#61; &amp;#36;pdo-&amp;#62;prepare&amp;#40;&amp;#36;sql&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;args &amp;#61; array&amp;#40;&amp;#39;&amp;#58;name&amp;#39;&amp;#61;&amp;#62;&amp;#39;Some Value&amp;#39;,&amp;#39;&amp;#58;ts&amp;#39;&amp;#61;&amp;#62;microtime&amp;#40;true&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;if&amp;#40; &amp;#36;stmt-&amp;#62;execute&amp;#40;&amp;#36;args&amp;#41; &amp;#41;&amp;#123;&lt;br /&gt;    .....&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;When i run and check the db, it creates 2 records with a difference in the ts field of some few micro seconds. On my production system which is running PHP5.3, that is not an issue.&lt;br /&gt;Could it be a problem in the driver or PHP itself&lt;br /&gt;Comments: Hi,&amp;#10;&amp;#10;I have passed on your issue to customer support, and we&amp;#39;ll see if we can replicate it on our side.&amp;#10;&amp;#10;Thanks for reporting it.&amp;#10;&amp;#10;Cheers,&amp;#10;&amp;#10;Jonathan</description><author>jguerin</author><pubDate>Thu, 17 May 2012 16:59:09 GMT</pubDate><guid isPermaLink="false">Commented Issue: PDOStatement execute error [22416] 20120517045909P</guid></item><item><title>Created Issue: PDOStatement execute error [22416]</title><link>http://sqlsrvphp.codeplex.com/workitem/22416</link><description>I am using PHP 5.4 &amp;#40;zend 5.6&amp;#41;, IIS 7.5,  and SQLSRV-PHP driver on my development machine. I tried inserting some data into SQL2008R2 database using the new driver but to my surprise every time i run execute&amp;#40;&amp;#41;, it inserts the same record twice. Below is my code&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#36;pdo  &amp;#61; new PDO&amp;#40;&amp;#34;sqlsrv&amp;#58;server&amp;#61;&amp;#40;local&amp;#41;&amp;#59;database&amp;#61;devDb&amp;#59;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;sql  &amp;#61; &amp;#34;insert into tblTest &amp;#40;name,ts&amp;#41; values&amp;#40;&amp;#58;name, &amp;#58;ts&amp;#41;&amp;#34;&amp;#59;&lt;br /&gt;&amp;#36;stmt &amp;#61; &amp;#36;pdo-&amp;#62;prepare&amp;#40;&amp;#36;sql&amp;#41;&amp;#59;&lt;br /&gt;&amp;#36;args &amp;#61; array&amp;#40;&amp;#39;&amp;#58;name&amp;#39;&amp;#61;&amp;#62;&amp;#39;Some Value&amp;#39;,&amp;#39;&amp;#58;ts&amp;#39;&amp;#61;&amp;#62;microtime&amp;#40;true&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;if&amp;#40; &amp;#36;stmt-&amp;#62;execute&amp;#40;&amp;#36;args&amp;#41; &amp;#41;&amp;#123;&lt;br /&gt;    .....&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;When i run and check the db, it creates 2 records with a difference in the ts field of some few micro seconds. On my production system which is running PHP5.3, that is not an issue.&lt;br /&gt;Could it be a problem in the driver or PHP itself&lt;br /&gt;</description><author>quaspam</author><pubDate>Thu, 17 May 2012 14:33:07 GMT</pubDate><guid isPermaLink="false">Created Issue: PDOStatement execute error [22416] 20120517023307P</guid></item><item><title>Closed Issue: bindValue() is not accepting non-english chars [22415]</title><link>http://sqlsrvphp.codeplex.com/workitem/22415</link><description>I cannot put non english chars as params in bindValue&amp;#40;&amp;#41;, like &amp;#224;.&lt;br /&gt;&lt;br /&gt;Please see this code&amp;#58; http&amp;#58;&amp;#47;&amp;#47;pastebin.com&amp;#47;QBahEFBG&lt;br /&gt;&lt;br /&gt;It triggers this exception&amp;#58;&lt;br /&gt;&lt;br /&gt;Database&amp;#58;&amp;#58;DataTable&amp;#58; IMSSP - SQLSTATE&amp;#91;IMSSP&amp;#93;&amp;#58; An error occurred translating string for input param 1 to UCS-2&amp;#58; No mapping for the Unicode character exists in the target multi-byte code page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note that enabling the commented-out line &amp;#40;setAttribute&amp;#41; doesn&amp;#39;t help.&lt;br /&gt;Any idea&amp;#63;&lt;br /&gt;Comments: &lt;p&gt;Glad to see you worked it out. &amp;#58;&amp;#41;&lt;/p&gt;</description><author>jguerin</author><pubDate>Tue, 20 Mar 2012 18:26:18 GMT</pubDate><guid isPermaLink="false">Closed Issue: bindValue() is not accepting non-english chars [22415] 20120320062618P</guid></item><item><title>Commented Issue: bindValue() is not accepting non-english chars [22415]</title><link>http://sqlsrvphp.codeplex.com/workitem/22415</link><description>I cannot put non english chars as params in bindValue&amp;#40;&amp;#41;, like &amp;#224;.&lt;br /&gt;&lt;br /&gt;Please see this code&amp;#58; http&amp;#58;&amp;#47;&amp;#47;pastebin.com&amp;#47;QBahEFBG&lt;br /&gt;&lt;br /&gt;It triggers this exception&amp;#58;&lt;br /&gt;&lt;br /&gt;Database&amp;#58;&amp;#58;DataTable&amp;#58; IMSSP - SQLSTATE&amp;#91;IMSSP&amp;#93;&amp;#58; An error occurred translating string for input param 1 to UCS-2&amp;#58; No mapping for the Unicode character exists in the target multi-byte code page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note that enabling the commented-out line &amp;#40;setAttribute&amp;#41; doesn&amp;#39;t help.&lt;br /&gt;Any idea&amp;#63;&lt;br /&gt;Comments: ** Comment from web user: fmntf ** &lt;p&gt;Excuse me, I created the file under Linux in UTF-8. Then I copied it in Windows and updated db params with notepad&amp;#43;&amp;#43;, which changed the encoding.&lt;/p&gt;&lt;p&gt;The issue does not exist and can be closed.&lt;/p&gt;</description><author>fmntf</author><pubDate>Tue, 20 Mar 2012 07:58:05 GMT</pubDate><guid isPermaLink="false">Commented Issue: bindValue() is not accepting non-english chars [22415] 20120320075805A</guid></item><item><title>Commented Issue: bindValue() is not accepting non-english chars [22415]</title><link>http://sqlsrvphp.codeplex.com/workitem/22415</link><description>I cannot put non english chars as params in bindValue&amp;#40;&amp;#41;, like &amp;#224;.&lt;br /&gt;&lt;br /&gt;Please see this code&amp;#58; http&amp;#58;&amp;#47;&amp;#47;pastebin.com&amp;#47;QBahEFBG&lt;br /&gt;&lt;br /&gt;It triggers this exception&amp;#58;&lt;br /&gt;&lt;br /&gt;Database&amp;#58;&amp;#58;DataTable&amp;#58; IMSSP - SQLSTATE&amp;#91;IMSSP&amp;#93;&amp;#58; An error occurred translating string for input param 1 to UCS-2&amp;#58; No mapping for the Unicode character exists in the target multi-byte code page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note that enabling the commented-out line &amp;#40;setAttribute&amp;#41; doesn&amp;#39;t help.&lt;br /&gt;Any idea&amp;#63;&lt;br /&gt;Comments: ** Comment from web user: robertjohnson ** &lt;p&gt;http&amp;#58;&amp;#47;&amp;#47;social.msdn.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;sqldriverforphp&amp;#47;threads&lt;/p&gt;&lt;p&gt;Is your source file UTF-8 encoded, or have you tried something like this&amp;#63;&amp;#58;&lt;br /&gt;&amp;#36;stmt-&amp;#62;bindValue&amp;#40;&amp;#34;&amp;#58;val&amp;#34;, utf8_encode&amp;#40;&amp;#39;&amp;#224;&amp;#39;&amp;#41;, PDO&amp;#58;&amp;#58;PARAM_STR&amp;#41;&amp;#59;&lt;/p&gt;</description><author>robertjohnson</author><pubDate>Fri, 16 Mar 2012 13:21:37 GMT</pubDate><guid isPermaLink="false">Commented Issue: bindValue() is not accepting non-english chars [22415] 20120316012137P</guid></item><item><title>Created Issue: bindValue() is not accepting non-english chars [22415]</title><link>http://sqlsrvphp.codeplex.com/workitem/22415</link><description>I cannot put non english chars as params in bindValue&amp;#40;&amp;#41;, like &amp;#224;.&lt;br /&gt;&lt;br /&gt;Please see this code&amp;#58; http&amp;#58;&amp;#47;&amp;#47;pastebin.com&amp;#47;QBahEFBG&lt;br /&gt;&lt;br /&gt;It triggers this exception&amp;#58;&lt;br /&gt;&lt;br /&gt;Database&amp;#58;&amp;#58;DataTable&amp;#58; IMSSP - SQLSTATE&amp;#91;IMSSP&amp;#93;&amp;#58; An error occurred translating string for input param 1 to UCS-2&amp;#58; No mapping for the Unicode character exists in the target multi-byte code page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note that enabling the commented-out line &amp;#40;setAttribute&amp;#41; doesn&amp;#39;t help.&lt;br /&gt;Any idea&amp;#63;&lt;br /&gt;</description><author>fmntf</author><pubDate>Thu, 15 Mar 2012 16:49:37 GMT</pubDate><guid isPermaLink="false">Created Issue: bindValue() is not accepting non-english chars [22415] 20120315044937P</guid></item><item><title>Commented Issue: HY104 when binding an empty string [16410]</title><link>http://sqlsrvphp.codeplex.com/workitem/16410</link><description>Driver returns&lt;br /&gt;&lt;br /&gt;&amp;#91;HY104 0&amp;#93; &amp;#91;Microsoft&amp;#93;&amp;#91;SQL Server Native Client 10.0&amp;#93;Invalid precision value&lt;br /&gt;&lt;br /&gt;when executing parametrized query with binding of the empty string with default options&amp;#58;&lt;br /&gt;sqlsrv_query&amp;#40;&amp;#39;SELECT &amp;#63;&amp;#39;, array&amp;#40;&amp;#39;&amp;#39;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;I am using the 1.1 driver on PHP 5.3, SQL Server 2000.&lt;br /&gt;Comments: ** Comment from web user: tomkraw1 ** &lt;p&gt;Last year I released an application using PHP SQL driver v 2. It works on IIS 6, FCGI, PHP 5.3 and SQL 2000. Everything works well except those parametrized queries mensioned by &amp;#64;michalkocarek.&lt;/p&gt;&lt;p&gt;SQL 2000 works with this driver and PHP 5.3 if you have &amp;#34;Microsoft SQL Server 2005 Backward Compatibility Components&amp;#34; installed and SNAC.&lt;/p&gt;&lt;p&gt;&amp;#64;AshayC if you could suggest where is the probblem I will test it.&lt;/p&gt;</description><author>tomkraw1</author><pubDate>Fri, 20 Jan 2012 07:05:12 GMT</pubDate><guid isPermaLink="false">Commented Issue: HY104 when binding an empty string [16410] 20120120070512A</guid></item><item><title>Closed Issue: Prepared queries within a loop extremely slow [21679]</title><link>http://sqlsrvphp.codeplex.com/workitem/21679</link><description>I&amp;#39;ve documented the problem and workaround solution here&amp;#58; http&amp;#58;&amp;#47;&amp;#47;social.technet.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;sqldriverforphp&amp;#47;thread&amp;#47;7b655c82-e4e3-4a98-ac47-0ca9c13d5864&lt;br /&gt;Comments: &lt;p&gt;Information about this is in the TechNet thread. It looks like some database issues, and not a driver one.&lt;/p&gt;</description><author>jguerin</author><pubDate>Fri, 13 Jan 2012 21:33:49 GMT</pubDate><guid isPermaLink="false">Closed Issue: Prepared queries within a loop extremely slow [21679] 20120113093349P</guid></item></channel></rss>