开发者

How do I connect to a MSSQL database with the Zend Framework?

I'm trying to connect to a mssql db with the Zend Framework, my application.ini looks like this:

resources.db.adap开发者_如何学Pythonter = "sqlsrv"

resources.db.params.host = "localhost\SQLExpress"

resources.db.params.username = "*"

resources.db.params.password = "**"

resources.db.params.dbname = "Database"

resources.db.isDefaultTableAdapter = true

Is there anything wrong with the above?

Thanks.


resources.db.adapter = "sqlsrv"
resources.db.host = "localhost\SQLEXPRESS"
resources.db.dbname = "DatabaseName"
resources.db.isDefaultTableAdapter = true 
resources.db.driver_options.ReturnDatesAsStrings = true

No need for Username or Password.

I always use ReturnDatesAsStrings as it is much easier to handle MsSQL in this way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜