<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tags 'PHP' and 'Filestream'</title><link>http://blogs.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=PHP,Filestream&amp;orTags=0</link><description>Search results matching tags 'PHP' and 'Filestream'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Using the FILESTREAM Functionality of SQL Server 2008</title><link>http://blogs.iis.net/sqlphp/archive/2009/02/11/using-the-filestream-functionality-of-sql-server-2008.aspx</link><pubDate>Thu, 12 Feb 2009 01:17:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:3010647</guid><dc:creator>Anonymous</dc:creator><cs:applicationKey>sqlphp</cs:applicationKey><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In this post I want to demonstrate how the streaming capabilities of the SQL Server 2005 Driver for PHP work seamlessly with the new FILESTREAM functionality in SQL Server 2008. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The FILESTREAM functionality in SQL Server 2008 enables applications to store unstructured data, such as documents and images, on the file system. Applications can leverage the rich streaming APIs and performance of the file system and at the same time maintain transactional consistency between the unstructured data and corresponding structured data. You can learn more about the FILESTREAM feature by starting here: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb895234.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb895234.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;Designing and Implementing FILESTREAM Storage&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;To follow this demonstration, you will need to do two things first:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Enable FILESTREAM on an instance of SQL Server. Instructions for doing this are here: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc645923.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc645923.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;How to: Enable FILESTREAM&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Create a FILESTREAM-enabled database. Instructions for doing this are here: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc645585.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc645585.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;How to: Create a FILESTREAM-Enabled Database&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;. The database I will use for demonstration purposes can be created with this script:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;USE [master];&lt;BR&gt;GO&lt;BR&gt;&amp;nbsp;&lt;BR&gt;IF EXISTS (SELECT * FROM sys.databases &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE name = 'FilestreamDB')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DROP DATABASE FilestreamDB;&lt;BR&gt;GO&lt;BR&gt;&amp;nbsp;&lt;BR&gt;CREATE DATABASE FilestreamDB&lt;BR&gt;ON&lt;BR&gt;PRIMARY (NAME = F_Stream1,&amp;nbsp;FILENAME = 'c:\data\FilestreamDB.mdf'),&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FILEGROUP FileStreamGroup1 CONTAINS&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;FILESTREAM(NAME = F_Stream2,&amp;nbsp;FILENAME = 'c:\data\filestream1')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOG ON (NAME = F_StreamLog1,&amp;nbsp;FILENAME = 'c:\data\FilestreamDB_log.ldf')&lt;BR&gt;GO&lt;BR&gt;&amp;nbsp;&lt;BR&gt;USE FilestreamDB;&lt;BR&gt;GO&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Create Table StreamTable (&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID uniqueidentifier rowguidcol NOT NULL unique,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFileStream varbinary(max) FILESTREAM&lt;BR&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Once you have completed these two steps, the coding patterns for sending and retrieving stream data with the SQL Server 2005 Driver for PHP are no different than those for sending/retrieving stream data from other column types (see &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc296191(SQL.90).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc296191(SQL.90).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;How to: Send Stream Data&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; and &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc296155(SQL.90).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc296155(SQL.90).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;Retrieving Stream Data&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; for more information). &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Let’s look at an example of sending and retrieving FILESTREAM data.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Sending FILESTREAM Data&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Although the code pattern for sending stream data to a FILESTREAM column is the same as it is for sending stream data to any column, the Transact-SQL that defines the query may new. A FILESTREAM-enabled database requires a &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms187942.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms187942.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;uniqueidentifier&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; column, and there is no function (such as SCOPE_IDENTITY()) to retrieve the generated GUID after performing an INSERT. So, in the code below, I’ve modified the Transact-SQL so I can select the GUID for use later. Also note that, in the parameter array, I’ve specified the PHP type as a binary stream and the SQL type as varbinary(‘max’) (see &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc296208(SQL.90).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc296208(SQL.90).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;How to: Specify PHP Data Types&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; and &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc626305(SQL.90).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc626305(SQL.90).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;How to: Specify SQL Server Data Types&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; for more information).&lt;/FONT&gt;&lt;/P&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;/* Define a parameterized query to insert data. */&lt;BR&gt;$tsql = "DECLARE @id UNIQUEIDENTIFIER;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET @id = NEWID();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO StreamTable (ID, myFileStream)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (@id, ?);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT @id AS ID";&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Open data as a stream. */&lt;BR&gt;$pic = fopen("C:\Pics\Tree.jpg","r");&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Define the parameter array. */&lt;BR&gt;/* Note the specification of the PHPTYPE and SQLTYPE. */&lt;BR&gt;$params = array(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $pic,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLSRV_PARAM_IN, &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY),&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLSRV_SQLTYPE_VARBINARY('max')&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Execute the query. */&lt;BR&gt;$stmt = sqlsrv_query($conn, $tsql, $params);&lt;BR&gt;if ($stmt === false) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in statement execution.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die( print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Retrieving FILESTREAM Data&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The coding pattern for retrieving FILESTREAM data is exactly as it is for retrieving any type of streamable data. In the code below, I have to do a little work to retrieve the GUID by moving to the next result set of the query executed in the code above.&lt;/FONT&gt;&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;/* Skip the rows affected result by moving to the next result. */&lt;BR&gt;if(sqlsrv_next_result($stmt) === false)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in moving to next result.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die( print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Retrieve the first (only) row of the next result. */&lt;BR&gt;if(sqlsrv_fetch($stmt) === false)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in retrieving row.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die( print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Get the first field of the row and assign the value to $id. */&lt;BR&gt;if( !($id = sqlsrv_get_field($stmt, 0)) )&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in retrieving field.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die( print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Define a parameterized query to retrieve the newly inserted data. */&lt;BR&gt;$tsql = "SELECT myFileStream FROM StreamTable WHERE ID = ?";&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Use the retrieved uniqueidentifier as the parameter value. */&lt;BR&gt;$params = array($id);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Execute the query. */&lt;BR&gt;$stmt = sqlsrv_query($conn, $tsql, $params);&lt;BR&gt;if( $stmt === false )&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in statement execution.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die( print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;/* Retrieve the results as a binary stream and display in the browser. */&lt;BR&gt;if ( sqlsrv_fetch( $stmt ) )&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; $image = sqlsrv_get_field($stmt, 0, &lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="BACKGROUND: #d9d9d9; MARGIN: 0in 0in 0pt 0.5in; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY));&lt;BR&gt;&amp;nbsp;&amp;nbsp; fpassthru($image);&lt;BR&gt;}&lt;BR&gt;else&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Error in retrieving data.&amp;lt;/br&amp;gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; die(print_r( sqlsrv_errors(), true));&lt;BR&gt;}&lt;BR&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;That’s it! There are many advantages to using the FILESTREAM functionality of SQL Server 2008, and it is easy to leverage this functionality with the streaming capabilities of the the SQL Server 2005 Driver for PHP.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Thanks.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;&lt;FONT face=Calibri size=3&gt;Brian Swan&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;&lt;FONT face=Calibri size=3&gt;Programming Writer, SQL Server 2005 Driver for PHP&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9341002" width="1" height="1"&gt;</description></item></channel></rss>