473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

COMException is Raised

hi,
I have created a collection of serviced components that performs money transaction between 5 schools. I have marked all the components with Transaction(TransactionOption.Required) attribute. All the methods in the components are marked with the AutoComplete() attribute.

But when I run the application, it is showing incorrect balance amount are being transferred. When I debug, I am getting this exception:

System. Runtime.InteropServices.COMException
The HRESULT for the exception is 0x8004E002.
"The root transaction wanted to commit, but transaction aborted."

This exception occurs only during the debugging session, and not when the components run outside of the debugger. Please give your suggestions to reolve this problem.

--
Sabi
Nov 18 '05 #1
2 2311
Hi,
Remove the AutoComplete attribute from all the methods and add calls to the ContextUtil.SetComplete() and ContextUtil.SetAbort().
Just make a try and get back to me with more detailed error report.

--
Thanks & Regards,
John Paul. A
MCP
"Sabi" wrote:
hi,
I have created a collection of serviced components that performs money transaction between 5 schools. I have marked all the components with Transaction(TransactionOption.Required) attribute. All the methods in the components are marked with the AutoComplete() attribute.

But when I run the application, it is showing incorrect balance amount are being transferred. When I debug, I am getting this exception:

System. Runtime.InteropServices.COMException
The HRESULT for the exception is 0x8004E002.
"The root transaction wanted to commit, but transaction aborted."

This exception occurs only during the debugging session, and not when the components run outside of the debugger. Please give your suggestions to reolve this problem.

--
Sabi

Nov 18 '05 #2
Dear John,
I have removed and placed the ContextUtil, but I am getting the same error report and it is taking more time to do this transaction.
--
Sabi
"John Paul. A" wrote:
Hi,
Remove the AutoComplete attribute from all the methods and add calls to the ContextUtil.SetComplete() and ContextUtil.SetAbort().
Just make a try and get back to me with more detailed error report.

--
Thanks & Regards,
John Paul. A
MCP
"Sabi" wrote:
hi,
I have created a collection of serviced components that performs money transaction between 5 schools. I have marked all the components with Transaction(TransactionOption.Required) attribute. All the methods in the components are marked with the AutoComplete() attribute.

But when I run the application, it is showing incorrect balance amount are being transferred. When I debug, I am getting this exception:

System. Runtime.InteropServices.COMException
The HRESULT for the exception is 0x8004E002.
"The root transaction wanted to commit, but transaction aborted."

This exception occurs only during the debugging session, and not when the components run outside of the debugger. Please give your suggestions to reolve this problem.

--
Sabi

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Damaji Jambhale | last post by:
COMException: Catostrphic failure When I added a "dll" reference in the web project. I was able to instantiate the class OK. But when I tried to set the properties, it failed with...
1
by: Steven | last post by:
Hi there, I am trying to export a chart using the Excel11 object from C#. I can properly open workbooks and read cells, but calling Export() on the Chart object throws a COMException ...
2
by: Zoury | last post by:
Hi there! I'm using a COM component from my C# application and I can't get it to work properly. I get a COMException (Invalid procedure call or argument) on this line : //***...
2
by: Jim Lacenski | last post by:
I have a VB class that uses .NET and ADODB to write into an Excel spreadsheet (via Jet) on a server as part of a web application. ADODB is used instead of ADO.NET because it greatly simplifies the...
2
by: Bassel Tabbara | last post by:
I wrote the following code: oApp = new Outlook.Application(); oApp = new Outlook.Application(); oNameSpace= oApp.GetNamespace("MAPI"); oNameSpace.Logon(null,null,true,true); //gets defaultfolder...
0
by: Mark Sisson | last post by:
"Daylor" <Daylor@012.net.il> wrote in message news:<3ee62275@news.012.net.il>... > Catch e As COMException > > MessageBox.Show(CStr(e.ErrorCode And &HFFFF)) > > the value i get from -e.ErrorCode...
4
by: Edwinah63 | last post by:
Hi guys, i have a collection containing the values and metadata about a current record. i build it by looping through the recordset as follows: Public Function NoNull(ByVal Value As Object)...
3
by: Jay A. Moritz | last post by:
I have an application that loads IE and iterates through web pages to retrieve information from the page then activates specific controls to retrieve the next page and iterate through that page for...
2
by: ortega23 | last post by:
Hi, I am trying to obtain the column number of the parent of a cell, if the cell is a linked cell (i.e. its value depends on another cells value). I try to read "Precedents"(parent cells) of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.