CREATE procedure dbo.asp_SetTmpImpPaye ( @Id_Usager int= null, @Langue varchar(1) = '', @DateDebut varchar(10) = '', @DateFin varchar(10) = '' ) as SET ANSI_NULLS ON SET ANSI_WARNINGS ON SET NOCOUNT ON begin SELECT * FROM OPENQUERY(Datadis, 'select * from livre') end GO>>I pus those two settings on, but I still got the error.
SET ANSI_WARNINGS ON >>>SET ANSI_NULLS ONQA uses ODBC which sets both values to ON by default. A stored procedure uses SET ANSI_NULLS settings at the time of it's creation. Any SET ANSI_NULLS inside stored procedure are ignored. See BOL for more details.