<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: MSSQL Server 2005 and CodeIgniter</title>
	<atom:link href="http://www.kaweb.co.uk/blog/mssql-server-2005-and-codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/</link>
	<description>Web Design Birmingham</description>
	<lastBuildDate>Wed, 25 Jan 2012 04:58:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: mpu</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-985</link>
		<dc:creator>mpu</dc:creator>
		<pubDate>Tue, 15 Mar 2011 10:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-985</guid>
		<description>A PHP Error was encountered

Severity: Warning

Message: CI_DB_sqlsrv_driver::db_connect(): It is not safe to rely on the system&#039;s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected &#039;Asia/Krasnoyarsk&#039; for &#039;7.0/no DST&#039; instead

Filename: sqlsrv/sqlsrv_driver.php

Line Number: 85</description>
		<content:encoded><![CDATA[<p>A PHP Error was encountered</p>
<p>Severity: Warning</p>
<p>Message: CI_DB_sqlsrv_driver::db_connect(): It is not safe to rely on the system&#8217;s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected &#8216;Asia/Krasnoyarsk&#8217; for &#8217;7.0/no DST&#8217; instead</p>
<p>Filename: sqlsrv/sqlsrv_driver.php</p>
<p>Line Number: 85</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: freak</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-948</link>
		<dc:creator>freak</dc:creator>
		<pubDate>Wed, 16 Feb 2011 11:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-948</guid>
		<description>Thanx that is just what i needed. Thank you very much. Continue the good work.</description>
		<content:encoded><![CDATA[<p>Thanx that is just what i needed. Thank you very much. Continue the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Database classes for SQL Server 2005 and SQL Server 2008 (using php_sqlsrv.dll from the Microsoft Data Programmability team) &#124; DEEP in PHP</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-936</link>
		<dc:creator>Database classes for SQL Server 2005 and SQL Server 2008 (using php_sqlsrv.dll from the Microsoft Data Programmability team) &#124; DEEP in PHP</dc:creator>
		<pubDate>Wed, 09 Feb 2011 15:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-936</guid>
		<description>[...] Blog &amp; information about the new driver (download link) [...]</description>
		<content:encoded><![CDATA[<p>[...] Blog &amp; information about the new driver (download link) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeIgniter/PHP + IIS + MySQL + MSSQL: It Works!</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-885</link>
		<dc:creator>CodeIgniter/PHP + IIS + MySQL + MSSQL: It Works!</dc:creator>
		<pubDate>Tue, 11 Jan 2011 13:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-885</guid>
		<description>[...] That driver uses a different API then the regular PHP mssql_* functions. In fact, it uses sqlsrv_* functions instead. So CodeIgniter can&#8217;t work with it out of the box. Luckily I found an excellent 2 and 1/2 year-old post by a guy who wrote the CodeIgniter driver to work with the Microsoft drivers. Just download the code, and drop it into system/database/drivers. Read up here: http://www.kaweb.co.uk/blog/mssql-server-2005-and-codeigniter/ [...]</description>
		<content:encoded><![CDATA[<p>[...] That driver uses a different API then the regular PHP mssql_* functions. In fact, it uses sqlsrv_* functions instead. So CodeIgniter can&#8217;t work with it out of the box. Luckily I found an excellent 2 and 1/2 year-old post by a guy who wrote the CodeIgniter driver to work with the Microsoft drivers. Just download the code, and drop it into system/database/drivers. Read up here: <a href="http://www.kaweb.co.uk/blog/mssql-server-2005-and-codeigniter/" rel="nofollow">http://www.kaweb.co.uk/blog/mssql-server-2005-and-codeigniter/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-747</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 10 Nov 2010 21:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-747</guid>
		<description>Very helpfully, you are the best, thank you very much!</description>
		<content:encoded><![CDATA[<p>Very helpfully, you are the best, thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdrisser</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-583</link>
		<dc:creator>mdrisser</dc:creator>
		<pubDate>Mon, 09 Aug 2010 17:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-583</guid>
		<description>Just what the doctor ordered. Thank you very much. I agree with Kirven, hopefully this will make it into the main CI, or atleast be made easier to find :)</description>
		<content:encoded><![CDATA[<p>Just what the doctor ordered. Thank you very much. I agree with Kirven, hopefully this will make it into the main CI, or atleast be made easier to find <img src='http://www.kaweb.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gnoon</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-559</link>
		<dc:creator>gnoon</dc:creator>
		<pubDate>Fri, 16 Jul 2010 08:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-559</guid>
		<description>I just realized that only change above is not help. Still get the error message &#039;This function only works with statements that are not scrollable&#039; after called sqlsrv_rows_affected(), which means that SCROLLABLE should be determined during execute statement.

Here the final code

// will not specify scrollable if it&#039;s DML commands
function _execute($sql)
{
  $sql = $this-&gt;_prep_query($sql);
  if(stripos($sql,&#039;UPDATE&#039;) !== FALSE &#124;&#124; stripos($sql,&#039;INSERT&#039;) !== FALSE) {
    return sqlsrv_query($this-&gt;conn_id, $sql, null, array());
  }
  return sqlsrv_query($this-&gt;conn_id, $sql, null, array(
    &#039;Scrollable&#039; =&gt; SQLSRV_CURSOR_STATIC,
    &#039;SendStreamParamsAtExec&#039; =&gt; true
  ));
}
function affected_rows()
{
  return @sqlsrv_rows_affected($this-&gt;result_id);
}

Best regards,
Noon</description>
		<content:encoded><![CDATA[<p>I just realized that only change above is not help. Still get the error message &#8216;This function only works with statements that are not scrollable&#8217; after called sqlsrv_rows_affected(), which means that SCROLLABLE should be determined during execute statement.</p>
<p>Here the final code</p>
<p>// will not specify scrollable if it&#8217;s DML commands<br />
function _execute($sql)<br />
{<br />
  $sql = $this-&gt;_prep_query($sql);<br />
  if(stripos($sql,&#8217;UPDATE&#8217;) !== FALSE || stripos($sql,&#8217;INSERT&#8217;) !== FALSE) {<br />
    return sqlsrv_query($this-&gt;conn_id, $sql, null, array());<br />
  }<br />
  return sqlsrv_query($this-&gt;conn_id, $sql, null, array(<br />
    &#8216;Scrollable&#8217; =&gt; SQLSRV_CURSOR_STATIC,<br />
    &#8216;SendStreamParamsAtExec&#8217; =&gt; true<br />
  ));<br />
}<br />
function affected_rows()<br />
{<br />
  return @sqlsrv_rows_affected($this-&gt;result_id);<br />
}</p>
<p>Best regards,<br />
Noon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gnoon</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-558</link>
		<dc:creator>gnoon</dc:creator>
		<pubDate>Fri, 16 Jul 2010 03:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-558</guid>
		<description>Thanks a lot for sqlsrv library.

It works perfectly with my SQL 2008 instance except the only error message

ERROR: [2] sqlsrv_rows_affected(): supplied resource is not a valid sqlsrv_stmt resource (line 297)

be written in the CI&#039;s log when I call affected_rows() after an UPDATE execution.

I figured it out by change affected_rows()&#039;s code, according to MSDN(http://msdn.microsoft.com/en-us/library/cc296178(SQL.90).aspx), to

	function affected_rows()
	{
		return @sqlsrv_rows_affected($this-&gt;result_id);
	}

which seems to fix the problem.

Best regards,
Noon</description>
		<content:encoded><![CDATA[<p>Thanks a lot for sqlsrv library.</p>
<p>It works perfectly with my SQL 2008 instance except the only error message</p>
<p>ERROR: [2] sqlsrv_rows_affected(): supplied resource is not a valid sqlsrv_stmt resource (line 297)</p>
<p>be written in the CI&#8217;s log when I call affected_rows() after an UPDATE execution.</p>
<p>I figured it out by change affected_rows()&#8217;s code, according to MSDN(http://msdn.microsoft.com/en-us/library/cc296178(SQL.90).aspx), to</p>
<p>	function affected_rows()<br />
	{<br />
		return @sqlsrv_rows_affected($this-&gt;result_id);<br />
	}</p>
<p>which seems to fix the problem.</p>
<p>Best regards,<br />
Noon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julio Bitencourt</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-549</link>
		<dc:creator>Julio Bitencourt</dc:creator>
		<pubDate>Thu, 08 Jul 2010 20:47:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-549</guid>
		<description>Hi!

I got an error when using the version 1.1

Fatal error: Call to undefined function sqlsrv_connect() in ....../system/database/drivers/sqlsrv/sqlsrv_driver.php on line 85

What can I do to fix this?</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I got an error when using the version 1.1</p>
<p>Fatal error: Call to undefined function sqlsrv_connect() in &#8230;&#8230;/system/database/drivers/sqlsrv/sqlsrv_driver.php on line 85</p>
<p>What can I do to fix this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kervin</title>
		<link>http://www.kaweb.co.uk/uncategorized/mssql-server-2005-and-codeigniter/comment-page-1/#comment-418</link>
		<dc:creator>Kervin</dc:creator>
		<pubDate>Wed, 26 May 2010 13:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.kaweb.co.uk/?p=110#comment-418</guid>
		<description>Thanks a lot.

Hopefully this will be included in the main CI build soon.

Great site design, btw.

Best regards,
Kervin</description>
		<content:encoded><![CDATA[<p>Thanks a lot.</p>
<p>Hopefully this will be included in the main CI build soon.</p>
<p>Great site design, btw.</p>
<p>Best regards,<br />
Kervin</p>
]]></content:encoded>
	</item>
</channel>
</rss>

