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

Urgent and Highly important :Help in MTS and Distributed transaction implemention

I am writing a distributed transaction code. My current scenario include a client database(Suppose client- having 4 main database) which can be installed anywhere which would connect to a public database placed at ISP datacentre(Suppose Server- having 2 database[host,transmissionqueue]). this server database is added to client as linked server through vb.net interface. i have a transmission routine which transmitts the data from the client to Server and update client transmit field. If i implement the distributed transaction in this scenrio is there any alternate to MTS . I m using the distributed transaction through vb.net interface using transaction object and setting 'begin distributed transaction' and 'set xact_abort on' and 'SET NOCOUNT ON' and 'SET REMOTE_PROC_TRANSACTIONS ON' options.
Sample code
''Start (Coding in VB.NET/ SQL Server 2000 backend on windows XP)
Public Function TransmitFiles(ByVal filepath As String, ByVal oDtTransmit As DataTable, ByVal iStation As Int16, ByRef TransmitErrorDetails As String) As Int32
Dim myConnection As SqlConnection = New SqlConnection("Data Source=shabbir;Database=AGS_LOGISTICS;UID=sa;pwd=S A;")
myConnection.Open()
Dim myTrans As SqlTransaction = myConnection.BeginTransaction()
Dim myCommand As SqlCommand = myConnection.CreateCommand()
myCommand.Transaction = myTrans
set_OPtions_on_database(myConnection, myTrans)
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"
myCommand.ExecuteNonQuery()
myCommand.CommandText = "INSERT INTO [192.168.1.181].AGS_TRANSMISSIONQUEUE.DBO.MANIFEST SELECT * FROM MANIFEST WHERE ORIGINSTATIONID=9007 AND TRANSMITTED=1"
myCommand.ExecuteNonQuery()
myTrans.Commit()
myTrans.Dispose()
Console.WriteLine("Both records are written to database.")
Catch e As Exception
myTrans.Rollback()
end try
end sub
''End

Different problems are coming at different time
1- The problem is that transaction object is running fine but its not inserting anything in the database.
2- the executenonquery is returning -1 even where it is returning the correct record affected count without the transaction object for this command.
3-sometimes giving SQL server not found or Access Denied from the front end.
4- Some times SQL log is showing
2004-08-14 07:55:35.46 server Attempting to initialize Distributed Transaction Coordinator.
2004-08-14 07:55:35.53 server Failed to obtain TransactionDispenserInterface: Result
Code = 0x8004d01b
2004-08-14 07:55:35.54 spid3 Starting up database 'master'.
2004-08-14 07:55:36.03 server Using 'SSNETLIB.DLL' version '8.0.766'.
2004-08-14 07:55:36.03 spid5 Starting up database 'model'.
2004-08-14 07:55:36.06 server SQL server listening on 192.168.1.190: 1433.
2004-08-14 07:55:36.06 server SQL server listening on 127.0.0.1: 1433.
2004-08-14 07:55:36.06 server SuperSocket Info: Bind failed on TCP port 1433.
2004-08-14 07:55:36.09 spid3 Server name is 'SHABBIR'.

?????Can some body explain what is wrong with my coding or wht setting to made in the system?

* I m using window XP professional and .NEt studio 2003 and MSSQL 8.0
one of my testing server is also the same confing and other testing server is windows2000 server.

Important : will i have to install MTS on each client or server only if i went for Distributed transactions through DCOM and MTS?
Will i face any difficulties regarding the com registration?
Can some body provide some short sample project?
or Can some body provide some Code sample for the transaction class and how to configure in the MTS?
Can some body provide Some helpfull links to clear my concepts and helpfull in implementation and code?

All your help would be highly appreciated.

Regards,
Shabbir

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Jul 21 '05 #1
0 2409

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

Similar topics

0
by: Johnson Ndiovu | last post by:
This is a multi-part message in MIME format --af4b847f-30bf-4b8d-acf1-2909de953a6e Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable DEAR FRIEND, ...
1
by: Steve Thorpe | last post by:
Hi have have two linked SQL Servers and I am trying to get things working smootly/quickly. Should I be using 'BEGIN TRANSACTION' or 'BEGIN DISTRIBUTED TRANSACTION' ? Basicly, these SPs update...
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...
1
by: DotNetJunkies User | last post by:
I am writing a distributed transaction code. My current scenario include a client database(Suppose client- having 4 main database) which can be installed anywhere which would connect to a public...
1
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? ...
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...
2
by: John Lee | last post by:
Hi, I have few questions related to .NET 2.0 TransactionScope class behavior: 1. Check Transaction.Current.TransactionInformation.DistributedIdentifier to identify if distributed transaction...
0
by: gshawn3 | last post by:
Hi, I am having a hard time creating a Trigger to update an Oracle database. I am using a SQL Server 2005 Express database on a Win XP Pro SP2 desktop, linked to an Oracle 10g database on a...
2
by: Dan Kelley | last post by:
I have 2 services, ServiceA and ServiceB. Certain user driven functions require ServiceA to perform some DB tasks, before sending a request to ServiceB to perform some additional tasks. If ServiceB...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.