在sql1链接数据库sql2,sql1中存储过程调用了sql2,用delphi的storedproc调用存储过程出错Heterogenous queries require the ansi_nulls an
1。 sql1链接接数据库sql2,
2。 用sa登陆sql2
3。 创建存储过程
set ansi_nulls on
set ansi_warnings on
CREATE PROCEDURE [dbo].[GetCwMaxMinYear]
AS
begin
Select Min(Convert(int,substring(name,12,4))) as minyear,
Max(Convert(int,substring(name,12,4))) as maxyear
From [sql2].master.dbo.sysdatabases Where substring(name,1,10)='UFDATA_005'
end
GO
set ansi_nulls off
set ansi_warnings off
存储过程在查询分析其中正确执行
delphi用bde方式storedproc控件访问这个储存过程,出现
"Heterogenous queries require the ansi_nulls and ansi_warnings for the connection..."
但用ado方式和adostoredproc就能正确访问
请问有谁碰到这样的问题?