News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
Some notes on SQL Server blobs with sqlsrv
November 22, 2010 @ 11:15:33

In this new post to his blog, Rob Allen has posted notes on some of his experience in working with blobs with SQL Server using UTF-8.

This turned out to be easy enough: Use ntext, nvarchar types in the database and add resources.db.params.driver_options.CharacterSet = "UTF-8" to your application.ini

He also includes some code to fix a problem he spotted with storing binary data into a varbinary field giving him an error about string translation. The fix came in the way of replacing the direct file_get_contents assignment to a variable over to a binding method that specified the data type as well.

0 comments voice your opinion now!
sqlserver binary data insert datatype varbinary


blog comments powered by Disqus

Similar Posts

Jani Hartikainen's Blog: Decoupling models from the database: Data Access Object pattern in PHP

Greg Freeman: Processing data with PHP using STDIN and Piping

Felix Geisendorfer's Blog: Windows XP Apache PHP output problem

Pierre-Alain Joye's Blog: Windows fixes release for Zip, fopen(,"rb") may not be binary safe

DevShed: Retrieving Information on Several Objects with Destructors in PHP 5


Community Events











Don't see your event here?
Let us know!


release package opinion performance symfony2 composer security unittest hack facebook introduction component framework overview database podcast language hhvm install application

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework