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

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 1381

"Ian" <ia********@NOSPAM.aol.com> wrote in message
news:C3**********************************@microsof t.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(TransactionOption.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 TransactionOption.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********@NOSPAM.aol.com> wrote in message
news:A7**********************************@microsof t.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(TransactionOption.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 TransactionOption.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
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...
7
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...
1
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...
7
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...
2
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...
1
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...
0
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...
4
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...
0
by: P. Adhia | last post by:
Hi, Consider the following query select * from t1 where c1 = ? and c2 = ?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...
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...

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.