about the PHP linked server error
am 13.03.2008 07:18:46 von leigha1983
--_542bb070-86f1-4d9f-8d2a-066304ed0d20_
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
Hello,
When I use php to invoke linked server configured in MS-SQL 2005, there is an error like this:
"Exception: ../application/models/TestDatabase.php -> TestDatabase -> testListNewDefect -> Unexpected exception of type [Zend_Db_Statement_Exception] with message [SQLSTATE[HY000]: General error: 10007 Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. [10007] (severity 5) [(null)]] in [C:\ZendFramework-1.0.3\library\Zend\Db\Statement\Pdo.php line 227]"
I think this error is caused by PHP but not zend framework, please give me some help. Thank you.
____________________________________________________________ _____
MSN ÖÐÎÄÍø£¬×îÐÂʱÉÐÉú»î×ÊѶ£¬°×Áì¾Û¼¯ÃÅ»§¡£
http://cn.msn.com
--_542bb070-86f1-4d9f-8d2a-066304ed0d20_--
Re: about the PHP linked server error
am 13.03.2008 13:57:23 von Elizabeth M Smith
ÀîÔ½ wrote:
>
> Hello,
>
> When I use php to invoke linked server configured in MS-SQL 2005, there is an error like this:
> "Exception: ../application/models/TestDatabase.php -> TestDatabase -> testListNewDefect -> Unexpected exception of type [Zend_Db_Statement_Exception] with message [SQLSTATE[HY000]: General error: 10007 Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. [10007] (severity 5) [(null)]] in [C:\ZendFramework-1.0.3\library\Zend\Db\Statement\Pdo.php line 227]"
>
> I think this error is caused by PHP but not zend framework, please give me some help. Thank you.
>
>
> ____________________________________________________________ _____
> MSN ÖÐÎÄÍø£¬×îÐÂʱÉÐÉú»î×ÊѶ£¬°×Áì¾Û¼¯ÃÅ»§¡£
> http://cn.msn.com
According to research on google this error is caused because you're
using a stored procedure with a heterogeneous query that needs these two
settings added ON CREATION
http://www.nophadon.com/2004/03/18/error-7405-heterogeneous- queries-sql-server-2/
Try creating the stored procedure with those options set
Thanks,
Elizabeth Smith
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php