Edit report at https://bugs.php.net/bug.php?id=32278&edit=1
ID: 32278 Comment by: mrezair at azarbod dot com Reported by: raulionescu at gmail dot com Summary: Remote linked server not accessibile Status: No Feedback Type: Bug Package: MSSQL related Operating System: WinXP Pro PHP Version: 5.0.4 Block user comment: N Private report: N New Comment: I used the following and it worked $result = mssql_query("SET ANSI_NULLS ON") or die(mssql_get_last_message()); $result = mssql_query("SET ANSI_WARNINGS ON") or die(mssql_get_last_message()); $sql_str = "SELECT * FROM OPENQUERY(TEST, 'SELECT I_DESCRIPTION FROM INVFULL')" ; Previous Comments: ------------------------------------------------------------------------ [2011-03-09 19:42:11] filthy_mcnasty at hotmail dot com had same problem. glad someone posted a workaround. thanks to the guy who did. ------------------------------------------------------------------------ [2011-03-02 01:00:29] michaeljsmalley at gmail dot com @ericsolan Thank you thank you thank you. Your fix... $result = mssql_query("SET ANSI_NULLS ON") or die(mssql_get_last_message()); $result = mssql_query("SET ANSI_WARNINGS ON") or die(mssql_get_last_message()); ... worked *perfectly* on CentOS release 5.2 (Final) connecting to Microsoft SQL Server 9.0.3042. ------------------------------------------------------------------------ [2011-03-02 00:55:55] jnovack at gmail dot com ericsolan at yahoo dot com you are wise behind your years. The workaround worked perfectly. ------------------------------------------------------------------------ [2009-12-14 20:38:41] ericsolan at yahoo dot com try adding this right before you call your mssql_query $result = mssql_query("SET ANSI_NULLS ON") or die(mssql_get_last_message()); $result = mssql_query("SET ANSI_WARNINGS ON") or die(mssql_get_last_message()); ------------------------------------------------------------------------ [2009-03-24 20:53:42] ups dot jer at gmail dot com To provide further info, I just verified that I cannot do this directly, nor can I call a stored proc which in turn hits the linked server. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=32278 -- Edit this bug report at https://bugs.php.net/bug.php?id=32278&edit=1