Code Monkey home page Code Monkey logo

Comments (11)

mediamonks-robert avatar mediamonks-robert commented on August 30, 2024

The bundle itself doesn't do much exciting to the queries themselves except for adding a "N" in front of the query placeholders. Can you maybe tell me what exact version of PHP you are running and provide a link to the dll's you are using so I can try to replicate the issue?

from symfony-mssql-bundle.

andrzejdziekonski avatar andrzejdziekonski commented on August 30, 2024

Thanks for reply.

php: 7.0.7-4+deb.sury.org~trusty+1 , and php7.0-sybase php7.0-odbc tdsodbc as bundle docs says to replace versions of those libs with using pvp version

from symfony-mssql-bundle.

slootjes avatar slootjes commented on August 30, 2024

Not sure when I will have time to check this. In the meanwhile you can maybe use SQL Server Profiler to see incoming queries and place them here. Are you also sure you TDS is configured with:

tds version = 8.0
client charset = UTF-8

as stated in the documentation of this bundle?

from symfony-mssql-bundle.

andrzejdziekonski avatar andrzejdziekonski commented on August 30, 2024

Yes settings are set correctly.

This is my error while editing entity with 'text' property that contains enters in it:

Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occurred while executing 'UPDATE tool SET name = N?, query = N?, slug = N?, updated_at = ? WHERE id = ?' with params ["new", "SELECT * \r\nFROM \r\nfos_user", "new-11", "2016-08-02 09:58:27.000000", 11]: SQLSTATE[HY000]: General error: 207 General SQL Server error: Check messages from the SQL Server [207] (severity 16) [(null)]" at .../vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 119

and runnable query from profiler:

UPDATE tool SET name = N'new', query = N'SELECT * 
FROM 
fos_user', slug = N'new-11', updated_at = '2016-08-02 09:58:27.000000' WHERE id = 11;

SQL SERVER sys.messages for code 207 claims:
Invalid column name '%.*ls'.

from symfony-mssql-bundle.

andrzejdziekonski avatar andrzejdziekonski commented on August 30, 2024

Do i need any other version of freetds for php7 than freetds-common ?

from symfony-mssql-bundle.

andrzejdziekonski avatar andrzejdziekonski commented on August 30, 2024

I noticed that in comparison to php5.6 i do not have any 'mssql' module installed as there is no php7.0-mssql package. Might it be the case?

from symfony-mssql-bundle.

mediamonks-robert avatar mediamonks-robert commented on August 30, 2024

Can you try executing the query without the newlines? Maybe your field currently does not allow newlines which causes it to break. As far as I know you don't need a mssql module, only dblib.

from symfony-mssql-bundle.

andrzejdziekonski avatar andrzejdziekonski commented on August 30, 2024

Well problem is i need those newlines, as i need accents in other properties of my entity. If use plain english and no newline chars everything is ok.

I got one more question. Kinda offtopic:
is there any use of $options in the bundle PDO constructor? I wanted to add: \PDO::ATTR_PERSISTENT option but i get an error: "driver does not support setting attributes". Well error seems to be clear, but i guess there is passed argument for a reason.

from symfony-mssql-bundle.

mediamonks-robert avatar mediamonks-robert commented on August 30, 2024

When using NTEXT instead of NVARCHAR you should be able to use newlines without any issue. If PDO itself returns "driver does not support setting attributes" then there is probably nothing the bundle can do to help you with.

from symfony-mssql-bundle.

jpillias avatar jpillias commented on August 30, 2024

Hi,

For information, we have the same problem here (without using your bundle) :

  • All working find with php5.X and PHPsybase
  • Encodning problem with PHP 7 and PHP7.0sybase

for now, we didn't found any solution. Did you found one ?

NB : we finally re-install PHP5 CLI to do the job...

from symfony-mssql-bundle.

slootjes avatar slootjes commented on August 30, 2024

Closing this as it doesn't seem to be related to code in this bundle.

from symfony-mssql-bundle.

Related Issues (4)

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.