473,394 Members | 1,702 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,394 software developers and data experts.

COM+ using Component Designer?

Hi all!

I've been playing a bit with Component Designer in Visual Studio.NET. Seems
to me like a great way to build simple data access components using "point
and click". However I can't figure out how to make a component made this way
into a component with transactional support which can be put into COM+.

The class which is Component Designer ends up with inhertits from
System.ComponentMode.Component. I understand that a class which will run
under COM+ has to inherit from ServicedComponent. Well, it can't inherit
from both. And I'd like to avoid mass coding of wrappers and things like
that.

Could someone point me a way to a simplest way to make a
ComponentModel.Component into an ServicedComponent?

Thanks in advance

Rafael
Nov 15 '05 #1
1 1414
Raffe,
I've been playing a bit with Component Designer in Visual Studio.NET. Seems to me like a great way to build simple data access components using "point
and click". However I can't figure out how to make a component made this way into a component with transactional support which can be put into COM+.

The class which is Component Designer ends up with inhertits from
System.ComponentMode.Component. I understand that a class which will run
under COM+ has to inherit from ServicedComponent. Well, it can't inherit
from both. And I'd like to avoid mass coding of wrappers and things like
that.

Could someone point me a way to a simplest way to make a
ComponentModel.Component into an ServicedComponent?
The short of it is: you can't.

One thing to note is that what the VS.NET IDE and the framewor call
"components" usually refer to classes deriving from
System.ComponentModel.Component, which are basically classes that support
the IDE designer facilities. ServicedComponents, on the other hand, have
nothing at all to do with this.

One great conflict thus arises: both kinds require you to inherit from a
base class (either Component, or ServicedComponent), which are not related.
So it means that at this point, you need to choose between them and can't
combine them.

If you'd like to keep using the designer facilities, I'd suggest creating
your component as you are now, and then wrapping it into a
ServicedComponent-derived class.

--
Tomas Restrepo
to****@mvps.org
Thanks in advance

Rafael

Nov 15 '05 #2

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

Similar topics

0
by: gman997 | last post by:
Hi all, At a high level here is what is going on -- I built a C# COM object. I need to call this com object from SQL Server using the sp_OACreate stored procedure in SQL Server. I build the COM...
4
by: gman997 | last post by:
Hi all, At a high level here is what is going on -- I built a C# COM object. I need to call this com object from SQL Server using the sp_OACreate stored procedure in SQL Server. I build the COM...
26
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using...
1
by: Hyun Chang Lee | last post by:
I have created a 'smart device appication" project. (C#) and added a component class. I expected the component designer shows, but I couldn't see. And there is no menu item like 'view designer'...
2
by: Edward Diener | last post by:
How does one specify in a component that a property is a pointer to another component ? How is this different from a property that is actually an embedded component ? Finally how is one notified in...
6
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone...
0
by: roberto | last post by:
I try to add a textbox from code of my custom component laid on the web form. It appears in the code behind but not in the designer; moreover when I switch from design to html view it gets removed...
6
by: M O J O | last post by:
Hi, How do I check if an ErrorProvider has errors? Take for example this code... (err = ErrorProvider...) Public Sub Test If TextBox1.Text= "" Then
8
by: John Granade | last post by:
I'm sure this has been asked but after searching the Internet, I just can find a clear answer. When should you add a component versus a class to you Windows Forms application? The timer is a...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.