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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with a trigger that uses a Linked Server Connection

Status
Not open for further replies.

rarubio1

Programmer
Jan 25, 2002
64
US
I have written a trigger that uses a Linked Server connection, but when it executes it gives me the following error message "Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection."
I do not know how to set the ANSI_NULLS and ANSI_WARNINGS, please help!

The following is the syntax of the trigger I have written:

INSERT LinkedSrvr.Scheduling.dbo.tblPartNumbers(fkPartNumberID,fkCustomerID,fkAlloyID,Description,Price,Units,ManufWeight)
SELECT S.InvtID,S.ProdMgrID,S.MaterialType,S.Descr,S.StkBasePrc,S.StkUnit,A.StdGrossWt
FROM Inserted S, InventoryADG A
WHERE S.InvtID = A.InvtID
AND S.S4Future10 = 1


Thanks,
RR :)
 

Set both this values to ON before the insert statement and then at the end turn it off

SET ANSI_NULLS ON
SET ANSI_WARNINGS ON

Both ANSI_NULLS and ANSI_WARNINGS is for controlling the NULL Behaviour

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top