Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Openquery in stored proc
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00849081
Message ID:
00849212
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Marc,

As I pointed out in my earlier post, "A stored procedure uses SET ANSI_NULLS settings at the time of it's creation. Any SET ANSI_NULLS inside stored procedure are ignored".
SET ANSI_NULLS ON
CREATE procedure dbo.asp_SetTmpImpPaye
...
You can find detailed explanation in SET ANSI_NULLS topic in BOL.

>I think the best help is that I give you my test.... here is my stored proc
>
>
>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.
>>
>>Where/how did you set them?
>>
>>>What is BOL ?
>>
>>"SQL Server Books Online" - SQL Server help.
>>
>>>
>>>>The OPENQUERY() (distributed query) requires
SET ANSI_WARNINGS ON
>>>>SET ANSI_NULLS ON
QA 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.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform