 |
| 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
|
|
|
|

May 26th, 2005, 04:04 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

May 26th, 2005, 05:06 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

May 27th, 2005, 04:38 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

May 27th, 2005, 04:45 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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?
|
|

May 27th, 2005, 05:16 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

May 27th, 2005, 05:36 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I don't know what else to say. maybe if you show the code?
|
|

May 27th, 2005, 06:04 AM
|
|
Authorized User
|
|
Join Date: May 2004
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

July 24th, 2006, 08:01 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |