How To connect to Microsoft SQL Server 

http://www.symfony-project.org/forum/index.php/m/24843/

Have anyone use Symfony connect to Ms SQL .I have a problem with it,It alway have SQLException .With the database.yml

all: propel: class: sfPropelDatabase param: phptype: sqlserver hostspec: E-Field0204 database: Northwind username: sa password: db

and It's easy to connect through mssql.dll

$connect = mssql_connect('E-Field0204','sa','db');

It's Ok and I have no problem when connect to mysql

The log file Error :

Mar 29 18:02:30 symfony [info] {sfCreole} connect(): DSN: array (   'database' => 'Northwind',   'encoding' => NULL,   'hostspec' => 'E-Field0204',   'password' => 'db',   'persistent' => NULL,   'phptype' => 'mssql',   'port' => NULL,   'protocol' => NULL,   'username' => 'sa', ), FLAGS: 0

How To connect to Microsoft SQL Server 

could the problem be with null port number? try to specify it (default is 1433)

also you may have a look at this post: http://permalink.gmane.org/gmane.comp.php.cowiki.user/195

pezetgee

How To connect to Microsoft SQL Server 

Thanks pezetgee!

It's the problem with port Number!

The error also appear when we use "port: 1433" in database.yml .It's just OK when we use defaut port. I.e., Follow your link ,I fix it by comment in file creole/drivers/mssql/MSSQLConnection.php:

/*
      if(!empty($dsninfo['port'])) {
              $dbhost .= $portDelimiter.$dsninfo['port'];
      } else {
              $dbhost .= $portDelimiter.'1433';
      }
*/