Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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 May 26th, 2005, 04:04 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default Distributed Transaction Error

Hi all,

I'm working with a VB 6 app that uses COM componensts utilizing COM+ services on a Windows 2000 Professional system. These COM+ components access and manipulate SQL Server 2000 data. Recently, I've modified a module in the client application and now I'm getting an error message in the COM component that reads:
Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

I've searched Microsoft.com for this error and found info at this URL:
http://support.microsoft.com/default...b;en-us;834849

But the scenario described in the document doesn't match mine. Apparently all code is okay and TransactionMode property of each participating component is perfectly set but the error still occurs. An important thing to note is that the error doesn't occur while adding a record. It occurs only when a record is edited and then saved. Even though the same code base is used to perform both the operations.

Please help me solve this issue. Any help or ideas are greatly appreciated.

Regards,


ejan
__________________
ejan
 
Old May 26th, 2005, 05:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Have you ruled out simple things like timeouts?

In my experience you can't always believe non-specific error messages like this. Assuming that you can re-produce this error in a debug environment, you need to be absolutely sure there are no other errors occurring earlier in the process that may have been lost.

Google Groups search can be useful source of ideas too.

hth
Phil
 
Old May 27th, 2005, 04:38 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default

I believe it's nothing to do with timeout because the error pops up within three to eight seconds. So this is not the issue. It was a good idea, though not useful, to check errors other than the one we've been talking about. I checked the Errors collection of the connection object as soon as the error occured (as soon as the control flow entered the error handler) but the collection contained only one Error object, exactly the same as I described in my first post.

Any ideas?

Regards,


ejan
 
Old May 27th, 2005, 04:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

These things are very hard to track down.

I'm assuming you've checked the Event Log to see if there's any extra info? Maybe waiting until your code enters the error handler is too late - have you tried running it all in debug with the option to 'break on all errors'?

You say you have just made some code changes. If you rollback those changes does the problem go away?
 
Old May 27th, 2005, 05:16 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm unable to figure out any usefull info in the EventLog. I tried the option 'Break On All Errors' so as soon as error occurs, the program stops to execute and the line which causes the error is highlighted. In this line I've called the Execute method of the Connection object and the statement executed modifies data. Even at this point, the Connection.Errors property contained that same error.

Quite honestly, I've changed a couple of lines in the client application to allow the same item (Miscilanious item) to be entered multiple times. It's okay because I've added an Identity column in the table and set it as the Primary key. Everything works just fine. If I enter this Misc item more than once in an entry, it gets saved without any error. But when I edit that same record and try saving it (even without making a single change) it raises the error. I'm unable to track this beast down.

Any ideas?

Regards,


ejan
 
Old May 27th, 2005, 05:36 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't know what else to say. maybe if you show the code?
 
Old May 27th, 2005, 06:04 AM
Authorized User
 
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
Default

Dear Phil,

Thanks alot for your tireless efforts. Though the problem has not solved, I'm sure it'll not remain unsolved for a long time. I'm researching for it and am quite sure to find a solution to this issue. As soon as I do, I'll post that straight to this topic.

Any ideas are more than welcome from all members.

Regards,

ejan
 
Old July 24th, 2006, 08:01 AM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Ejan

I faced the same exact problem on my VB6 Application, when adding its ok, but when updating this message appears, and another thing, on the development machine this does not happen, it only happens on the deployment machine, please reply if you found the solution for this problem.

The code is in VB6-SP5, The Database is SQL2K and the machine is WinXP.

Rgrds





Similar Threads
Thread Thread Starter Forum Replies Last Post
Transaction Log Error hugh@kmcnetwork.com SQL Server 2000 1 June 4th, 2008 09:26 PM
SSIS Error - Transaction context in use by another ACDC BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 February 6th, 2007 09:54 AM
Distributed Transaction Coordinator fkumar BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 July 21st, 2006 12:26 AM
Distributed Transaction in different web services avanishp .NET Web Services 1 December 16th, 2004 12:39 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.