Closed (won't fix)
Project:
Drupal driver for SQL Server and SQL Azure
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jan 2011 at 23:35 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedThe driver doesn't support SQL Server 2000. Just SQL Server 2005 or later.
Comment #2
emilorol commentedHumm... I coded an small script just to make sure I had connection and I was able to connect using the regular PHP function mssql_connect and mssql_query. So PDO MS-SQL doesn't support MS-SQL 2000?
Comment #3
Anonymous (not verified) commentedNo, just MSSQL 2005 or greater.
From their page on CodePlex http://sqlsrvphp.codeplex.com/
Comment #4
ashayc commentedLet me clear up some confusion here : MSSQL != SQLSRV
- MSSQL driver (PDO or not) is the community authored driver based on deprecated technologies. It supports SQL 2000 but does not support newer capabilities in SQL 2005 or later.
- SQLSRV driver (PDO or not) is the Microsoft authorized driver based on current supported technologies. It suppots SQL 2005 and later - on Windows. DamZ's patch/module is based on the PDO_SQLSRV driver for WIndows deployments, SQL 2008 or later is recommended.
PDO_SQLSRV defines the SQLSRV_ATTR_DIRECT_QUERY attribute used by DamZ's patch/module, PDO_MSSQL does not (the "SQLSRV_" prefix is a good clue).
Comment #5
emilorol commented@ashayc thank you for the clarification.
OK, so in a nutshell I have a linux server with Drupal 7 setup and since so much advertising has been made to the new PDO support, I was thinking to use it to have an small module connect to the office MS-SQL server grab some data and display it in a page when call. That is the reason why I was using this driver.
Should I use something else?
BTW I was playing with the code and I change it to:
Now I am getting a connection, but it seems to be failing at the db_query and also at:
Once again thank you,
Emil
Comment #6
ashayc commentedEmil,
"I have a linux server with Drupal 7 setup and since so much advertising has been made to the new PDO support, I was thinking to use it to have an small module connect to the office MS-SQL server grab some data and display it in a page when call"
I'm afraid I'm not much of help on Linux. I can say this, DamZ designed this module for the PDO_SQLSRV design and, as you have found, I think it's going to take a fair bit of work to change it a little at time with each issue until you get it to work on PDO_MSSQL. It's all on Windows with this driver or nothing, I'm afraid.
PHP support on Windows is much better these days (IIS, SQL Server, and PHP itself), maybe you give it a try with a test install of your site?
Comment #7
emilorol commentedHere is my final working solution in case someone need it a simple way to connect to MS-SQL 2000 from Drupal 7 in Linux:
Thank you all for your time and effort.
Emil
Comment #8
damien tournoud commentedTriaging. It is not in the scope of this project to support neither Linux nor SQL Server 2000.
The fatal error here is by design: it is PHP broken way to do runtime checks :)
Comment #9
Jean Gionet commented@emilacosta
where exactly did you put this custom code? I'd like to test it out with this old MSSQL 2000 server I have collecting dust!
thanks
Comment #10
emilorol commented@Jean Gionet,
I created a module where I inserted the code to display the data as a regular Drupal table. I also did for someone else reading this threat the other day a modification for a cron job using Drupal 7 to import data from MSSQL into Drupal as nodes. Here is the new code: