Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem ANSI_NULLS en ANSI_WARNINGS

Status
Not open for further replies.

michelleqw

Programmer
Jan 4, 2004
120
DE
Dear sqlserver users,

We have made a stored procedure to get a table from an other server database.

Syntax:
Select * into tblX from [sourceServer].sourcedb.dbo.tblX

As we do this sentence in the query analyzer, everything goes well.

When we place this sentence in a SP a warning goes up about ANSI_NULLS en ANSI_WARNINGS.

Warning 7405 says: for connection the options ANSI_NULLS and ANSI_WARNINGS must be set.

When these options are set in the SP to on, the same error still occurs!

Knows someone a solution??

Michelle.
 
Have you tried setting them outside of the SP?

Code:
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GO

CREATE PROC <proc name>
AS
<blah>
GO

--James
 
OK, how about before you execute the SP?

Code:
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON

EXEC <proc name>

--James
 
we placed these sttings also in the properties of our servers on tabblad connections.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top