views:

99

answers:

1

Hi, I would like use PHP PDO with SqlAnywhere, but don't have the driver on php site. Can I add a lib of sqlanywhere to use with PDO? ODBC is the last option.

+1  A: 

I haven't tried this, but no one has answered in two days so I'll give a suggestion:

The PDO_MSSQL driver should in theory be able to talk to any FreeTDS back-end, including Sybase Server and perhaps even Sybase ASA. It may require you to do some hunting and reading blogs, forums, etc. to figure out the right freetds.conf entries to make it work.

However, the PDO_MSSQL driver is marked as "experimental" and AFAIK no one is maintaining it. Microsoft has abandoned it as well, since they're developing their own (non-PDO) PHP extension for SQL Server.*

So it's probably the better part of valor on your part to use PDO_ODBC.


* There was an effort a couple of years ago for Microsoft and other RDBMS vendors to cooperate to contribute code to the PDO project, but the core PHP community rebuffed the vendors over their requirement to use a contributor license agreement to ensure that the code in the project remain free. It was a sad episode.

Bill Karwin