Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MTS , COM Component (Urgent) 1

Status
Not open for further replies.

sut

Programmer
Jun 6, 2001
12
0
0
US
I have COM components developed in VB. I am using SQL Server 7.0, MTS and ASP, HTML to design the web site.
I want a solution to the following situations.

1. Two different components totally independent of each other, called COM1 and COM2.
The Calling sequence is like this

COM1 calls COM2
If COM2 rollbacks the transaction (because any kind of error), it should roll back the transaction of COM1 also.
HOW CAN IT BE DONE?

2. I want to use 2 databases Database1 and Database2. There are some components stored on Database1 and Database2. Can components on these 2 different databases call each other?

It's very URGENT !!!
Waiting for suggestions.

Thanks
 
Regarding your question #1:

Set the class you're calling in your COM2 DLL so that it's MTSTransactionMode is "2 - Requires Transaction". That way if COM1 starts a transaction then calls COM2, COM2 will make use of it. If COM1 didn't have a transaction, then COM2 will create one.

If COM2 is making use of COM1's transaction, and calls the .rollback method, it will rollback COM1's transaction too.


Regarding question #2: I need more info. What kind of components, how are they registered, how do you intend to call them?

Chip H.
 
Thanks for your suggestion.
i will try that and let you know.
Regarding the second question,

i have one database server and 2 databases on it.
one for Publishing System (publishing the content)
second for Cache Management System (for the web site user)

I have 2 components one for each system on 2 different databases. If Cache Management can't find the content in the cache, will call Publishing system to get the content. the publishing system will then get the content from the database and passed it to Cache Management, I want to call COM components to do this.
How can I accomplish this?

How it can be done in Wscript?
Where can I find sample examples?

Thanks once again


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top