Coder Social home page Coder Social logo

mssqlbundle's Introduction

WARNING: This fork is abandoned :(

Install

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_class:   \Realestate\MssqlBundle\Driver\PDODblib\Driver
        host: %database_host%
        user: %database_user%
        password: %database_password%
        # options:
        #    ansi_nulls: on
        #    ansi_warnings: on

The %database_driver% must not be set, neither the %charset% parameter, as for stackoverflow.com/questions/8492941/doctrine-2-how-to-add-custom-dbal-driver#answer-8731924

The connection options (ansi_nulls and ansi_warnings) may be configured for MSSQL to ON|OFF


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

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

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

An example of freetds.conf (/etc/freetds/freetds.conf) is:

[mssql_server]
    host = xxx.xxx.xxx.xxx
    port = 1433
    tds version = 8.0
    client charset = UTF-8
    text size = 20971520

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.

mssqlbundle's People

Contributors

c0rrupt avatar fesor avatar liverbool avatar mikemeier avatar pasinter avatar rivaros avatar thepanz avatar warezthebeef avatar woodspire avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.