经典的asp异构查询需要ANSI_NULLS和ANSI_WARNINGS

时间:2016-01-08 17:45:32

标签: asp-classic sql-server-2000 ado

我使用insert命令链接服务器,例如

SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
INSERT linked_server.dbname.dbo.table SELECT a,b,c, FROM my_table

这个查询从smss看起来很好,但是当我通过经典的asp adodb.connection运行它时它会返回

Description: [Microsoft][ODBC SQL Server Driver][SQL Server]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.
Help context: 0
Help file: 
Native error: 7405
Error number: -2147217900
Error source: Microsoft OLE DB Provider for ODBC Drivers
SQL state: 37000

如何获得与smss相同的结果?感谢

0 个答案:

没有答案