473,770 Members | 4,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New to distributed components: query

Ian
I am working with Distributed Components with VB.NET for the first time
(pretty much), and am having the following problem. My components have been
added and are visible in component services manager. They have also been
added to the GAC.

On seeking to set a reference to these components on the COM tag of the Add
Referrence dialog, I get the following error message:

"A reference to <component name> could not be added. Converting the type
library to a .NET assembly failed. Type library <component name> was exported
from a CLR assembly and cannot be re-imported as a CLR assembly."

The components show up on the COM components tag, but not on the .NET
components tag, of the Add Reference dialog, so I dont see how I can get
round this. Any advice as to what I am doing wrong?

Thanks

Ian
Nov 21 '05 #1
3 1394

"Ian" <ia********@NOS PAM.aol.com> wrote in message
news:C3******** *************** ***********@mic rosoft.com...
I am working with Distributed Components with VB.NET for the first time
(pretty much), and am having the following problem. My components have
been
added and are visible in component services manager. They have also been
added to the GAC.

On seeking to set a reference to these components on the COM tag of the
Add
Referrence dialog, I get the following error message:

"A reference to <component name> could not be added. Converting the type
library to a .NET assembly failed. Type library <component name> was
exported
from a CLR assembly and cannot be re-imported as a CLR assembly."

The components show up on the COM components tag, but not on the .NET
components tag, of the Add Reference dialog, so I dont see how I can get
round this. Any advice as to what I am doing wrong?


You definitely need add the reference through the .NET components tab. If
you don't see them in the list, just navigate to them on disk.

David
Nov 21 '05 #2
Ian
"David Browne" wrote:
You definitely need add the reference through the .NET components tab. If
you don't see them in the list, just navigate to them on disk.


Thanks. However, there is something else I am puzzled about. I am trying to
implement transaction processing using VB.NET running on Windows 2000, though
the transaction I am using is fairly noddy at the moment, just by way of
exploration. The original question I raised was the by-product of another
problem, which is as follows:

The transaction I am using involves one server component that initiates a
transaction (using the Transaction(Tra nsactionOption. RequiresNew) attribute
setting). This component does not actually do anything, except call two
further components that add records to two different tables respectively an
in MSDE 2000 Database. Each of these secondary components has its Transaction
attribute set to TransactionOpti on.Supported.

The primary component has its references to the two secondary components set
using the .NET tab in the References dialog, as you said. Directly pointing
to the DLL's files in the <project>/bin directory on the development machine
(at this stage I do not have access to a separate server). I have a
straightforward Windows Application client that calls the primary component
in this way, which in turn calls the two secondary components. And the
transaction appears to work fine.

HOWEVER: the point of this exercise was to demonstrate the principle of
transaction processing. And part of that was to illustrate what happens when
a transaction fails. And the way to make it fail was to delete one of the
secondary components from the Component Services manager. That is supposed to
trigger an error in the transaction, and thus cause the transaction to not
complete, and indeed to roll back the work of the other secondary transaction
component.

The only problem is that the transaction doesnt fail. It still runs
perfectly even though the COM+ reference has been removed from Component
Services. I have even physically deleted the .tlb file, and run the
transaction again, and still it completes perfectly. This should not happen,
and makes me think that in some way COM+ is being bypassed. Yet things like
object pooling etc in COM+ services seem to work fine.

Any idea why my transaction is refusing to fail in these circumstances?
Nov 21 '05 #3

"Ian" <ia********@NOS PAM.aol.com> wrote in message
news:A7******** *************** ***********@mic rosoft.com...
"David Browne" wrote:
You definitely need add the reference through the .NET components tab.
If
you don't see them in the list, just navigate to them on disk.


Thanks. However, there is something else I am puzzled about. I am trying
to
implement transaction processing using VB.NET running on Windows 2000,
though
the transaction I am using is fairly noddy at the moment, just by way of
exploration. The original question I raised was the by-product of another
problem, which is as follows:

The transaction I am using involves one server component that initiates a
transaction (using the Transaction(Tra nsactionOption. RequiresNew)
attribute
setting). This component does not actually do anything, except call two
further components that add records to two different tables respectively
an
in MSDE 2000 Database. Each of these secondary components has its
Transaction
attribute set to TransactionOpti on.Supported.

The primary component has its references to the two secondary components
set
using the .NET tab in the References dialog, as you said. Directly
pointing
to the DLL's files in the <project>/bin directory on the development
machine
(at this stage I do not have access to a separate server). I have a
straightforward Windows Application client that calls the primary
component
in this way, which in turn calls the two secondary components. And the
transaction appears to work fine.

HOWEVER: the point of this exercise was to demonstrate the principle of
transaction processing. And part of that was to illustrate what happens
when
a transaction fails. And the way to make it fail was to delete one of the
secondary components from the Component Services manager. That is supposed
to
trigger an error in the transaction, and thus cause the transaction to not
complete, and indeed to roll back the work of the other secondary
transaction
component.

The only problem is that the transaction doesnt fail. It still runs
perfectly even though the COM+ reference has been removed from Component
Services. I have even physically deleted the .tlb file, and run the
transaction again, and still it completes perfectly. This should not
happen,
and makes me think that in some way COM+ is being bypassed. Yet things
like
object pooling etc in COM+ services seem to work fine.

Any idea why my transaction is refusing to fail in these circumstances?


Yes. Once you make the transition from COM to .NET, you don't go back
through COM+ to access other .NET components. This is exactly the same
reason why you couldn't add a COM reference to your other .NET component.
When one .NET object creates another .NET object is simply doen't call
CoCreateObject( ). It all happens inside .NET.

You could make your transaction fail by violating a CHECK constraint in the
database or something like that...

David
Nov 21 '05 #4

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

Similar topics

7
4003
by: J Goldman | last post by:
I'm looking for documentation pointers to learn what I need to put together a distributed database system. I've read through "Oracle 9i Database Administrator's Guide: Distributed Database Concepts" and Oracle Database Concepts: Introduction to the Oracle Server: Distributed Databases Overview", but I don't see how to do what I want. I would like to set up a distributed database system with location transparency and a shared schema...
7
13911
by: Prashanth | last post by:
Hi, We are facing some issues in COM+ deployment. We get system error "Unable to enlist in a distributed transaction" . It has a very inconsistant behaviour. On refreshing the screens couple of times, the error disappears.Also it reappears abruptly giving an impression that the transaction failed although the changes are commited to the database.Please let me know if any of you have faced it before. This is a .Net Application with...
1
8219
by: Eirik Tryggeseth | last post by:
During deployment of an application using distributed transactions managed under COM+ on an Oracle 9i RAC database, we encounter situations where the load balancing mechanisms in the RAC result in that the component context in the distributed transaction (in our case two different COM components) cannot hold onto the same ODBC connection. Or it may be that the database session is changed dynamically for the ODBC connection, so that...
7
2382
by: Richard Maher | last post by:
Hi, I am seeking the help of volunteers to test some software that I've developed which facilitates distributed two-phase commit transactions, encompassing any resource manager (e.g. SQL/Server or Oracle) controlled by Microsoft's Distributed Transaction Coordinator in a Windows2000 environment, with any resource manager under the control of DECdtm (e.g. Rdb (or Oracle via the XA Veneer)) in a VMS environment.
2
2931
by: Jo Siffert | last post by:
Hi all, I would like to perform an INSERT INTO LINKEDSVR.dbo.xyz.abc SELECT ... FROM dbo.dfg where LINKEDSVR is a linked server on another machine. Both servers are running SQLServer 2000 and have the DTC running. When I run this batch from QueryAnalyzer without explicitly using
1
6792
by: ammar_fake | last post by:
Hello! I have an Oracle linked server connected through MSDAORA. Linked server queries work perfectly - the "openquery" ones as well as the 4-part-named ones. The problem I have is with embedding the queries within SQL Server triggers. Trigger: CREATE TRIGGER tgTest ON .
0
1812
by: Matik | last post by:
Hi, MSSQL 2000 booth servers. Booth running DTC. Now, the client application, is starting in DB1 a procedure. The connection open to db, is within the transation opened from client. In the SP, I'm starting the transaction as well, with savepoint.
4
1670
by: JB | last post by:
Hi All, I need to write my first "distributed" application and due to my lack of knowledge and experience in that area, I'm stuck on the first big design decision. Reading a lot on distributed applications, remoting, etc didn't help me much for that particular issue. The main data the application manipulates is a list of Queries. A query is a custom object containing an SQL statement and some parameters to allow the query to run...
0
1668
by: P. Adhia | last post by:
Hi, Consider the following query select * from t1 where c1 = ? and c2 = ?
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9439
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10237
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8905
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.