Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2003, 03:47 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linked server transaction error


I have trigger on the update of a table which calls a stored procedure to update another table on a linked server.

If the trigger is called from Query Analyzer, it works fine and both the tables are updated. But when the trigger is called from an appplication (in this case, a Delphi app), the whole transaction fails. Even the origianal table is NOT updated.

Any help is appreciated.

Thanks,
-HP
 
Old July 16th, 2003, 09:09 AM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Me again. I found the solution. The following need to be set before doing any inserts or updates through an implicit or an explicit transaction. I put them in the trigger before calling the stored procedure.

<start trigger>

SET XACT_ABORT ON
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON

<call the stored procedure>
<end trigger>


I hope this helps somebody else too.

-Hari
 
Old September 30th, 2005, 01:54 PM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Apply SP 3a...
Shawn Shi





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using linked server - syntax error snufse SQL Server 2000 0 November 5th, 2008 05:37 PM
sql server transaction prrocess id 635 benn Reporting Services 0 March 22nd, 2006 07:06 AM
Linked Servers - Distributed Transaction ram2098 SQL Server 2000 3 July 21st, 2004 05:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.