Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-759

[GH-489] Fix driver error while introspecting sequences in SQL Server 2012

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5, 2.4.3
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of deeky666:

      Url: https://github.com/doctrine/dbal/pull/489

      Message:

      It seems the SQL Server drivers don't like SQL Server's special `sql_variant` data type when retrieving data from such columns. Therefore introspecting Sequences in SQL Server 2012 generates the following error:

      ```php
      Fatal error: Unexpected SQL type encountered in calc_string_size. in C:\cygwin\home\Administrator\dev\dbal\lib\Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement.php on line 226
      ```

      A workaround this limitation is to cast the specific columns to `VARCHAR` in the query.

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-489] was closed:
        https://github.com/doctrine/dbal/pull/489

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-489] was closed: https://github.com/doctrine/dbal/pull/489

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: