New PDO driver for SQL Server

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have created a PDO driver for SQL Server based on OLE-DB. The new
driver is capable of doing things that the ancient DBLIB can't. First
and foremost, you can retrieve varchar wider than 256 chars. You can
also retrieve NVARCHAR columns in a variety of encoding (UTF-8 being
the key one). It supports parameter binding and blobs as streams. In a
word, it's much better than the one that the PHP web site tell you not
to use.

The file is hosted here:

While the documentation is here:


Re: New PDO driver for SQL Server

"Chung Leong" schreef:
Quoted text here. Click to load it

Thanks Chung!

By the way: Do you know when the new driver from Microsoft for SQL
Server will be available?

The one that is announced here:

Will it be smarter to use your PDO driver instead?

Erwin Moller

Re: New PDO driver for SQL Server

On May 5, 6:56=A0pm, Erwin Moller
Quoted text here. Click to load it

I don't know when it'll get out of CTP status, if that's what you're

I don't really understand why Microsoft didn't go with using PDO.
That's the main reason I decided to roll my own. Our team is moving to
PHP5 and the DBLIB PDO drivier is sort of problematic. I also have
most of the code written already from a previous effort.

In theory, going through the native driver would yield better
performance. On the other hand, the OLE-DB infrastructure gives you
connection pooling. It probably just comes down to whether you want to
use PDO or not. I have to say though, since we'll be using this
ourselves, a bug would certainly get fixed very quickly.

Site Timeline