dabsquared/mssql-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dabsquared/mssql-bundle

Composer 安装命令:

composer require dabsquared/mssql-bundle

包简介

Driver for work with MsSQL server

README 文档

README

Add the isoft/mssql-bundle into composer.json

"require": {
    ....
    "isoft/mssql-bundle": "master-dev"
},

Usage

Add to section doctrine - dbal in config.yml option driver_class

doctrine:
    dbal:
        driver:         %database_driver%
        driver_class:   \Realestate\MssqlBundle\Driver\PDODblib\Driver

make sure your %database_driver% is set to pdo_dblib

In app/AppKernel.php registerBundles(), add the following line:

$bundles = array(
    ...
    new Realestate\MssqlBundle\RealestateMssqlBundle(),
    ...
);

In Doctrine\DBAL\DriverManager's $_driverMap property, add this driver to the list:

'pdo_dblib' => 'Realestate\DBAL\Driver\PDODblib\Driver',

This driver requires version 8.0 (from http://www.ubuntitis.com/?p=64) as default 4.2 version does not have UTF support

In /etc/freetds/freetds.conf, change tds version = 4.2 to tds version = 8.0

can't use nvarchar!!

In SQL 2000 SP4 or newer, SQL 2005 or SQL 2008, if you do a query that returns NTEXT type data, you may encounter the following exception: _mssql.MssqlDatabaseError: SQL Server message 4004, severity 16, state 1, line 1: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.

It means that SQL Server is unable to send Unicode data to FTREETDS, because of shortcomings of FTREETDS. You have to CAST or CONVERT the data to equivalent NVARCHAR data type, which does not exhibit this behaviour.

统计信息

  • 总下载量: 797
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 65
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固