Question Online Transaction Help

SyedImranShah

New member
Joined
Mar 4, 2009
Messages
3
Programming Experience
1-3
Dear Fellows,

I want to make an online transaction program for which I need help. The problem is that, if a branch enters an entry that entry should hit three system’s databases. These three systems are connected to network but the application is not connected. For example, there is two branches namely branch1 and branch2 and a head office namely HO1. If a user at branch1 enters a record that record not only hit that branch database, but also hit branch2 and HO1 databases as well. Can I use Virtual Private Network (VPN) to do this?

Is there any tutorial available for such problem? I am using VB.NET and SQL Server 2000. Any suggestion will highly be appreciated.
 
Hello.

One way would be to write a Server/Client system into your program, which would allow the programs to communicate with each other using simple TCP-Communication (some sort of encryption/key security would be nice, though). The program receives the message from another and places that one in it's database.

Another would be to write a sync-program which does nothing else then connecting to the other databases and syncs them and it self.

Or hit always the central database, and sync the other two with it...hard to tell without knowing the exact infrastructure.

Bobby
 
Thanx for reply. Can u please tell me more about "sync-program". I got your point about your first suggestion. That was always in my mind. But the problem is that some times network may not work properly and I want program in such a way that whenever it didn't hit all the three databases it will not be entered into the databases. Please any other suggestion?
 
With sync-program I meant a program which is regularly connecting to each database and syncs the entries within...but it's not what you want if you need to know if it worked.

I think the best solution for you would be to build the TCP-Communication. Before the transaction is saved, it should connect to each other, check the status of each and send the transaction. If it can't connect to one another, it won't let you do the transaction.

VB.NET:
Connect to each other server
Check the status
      Send the Transaction for storing
      Check the status again, if everyone received the transaction
            Do the Transaction and send OK to everyone
      Else
            Cancel Transaction
Else
      Cancel Transaction

Bobby
 
Thanx again dear. I want to ask another question related to this problem. Can I build windows form program (not ASP.NET) in .net which can connect to a remote systems those are placed in different cities. My main problem is that those systems are placed in different cities and that distributed transaction should update those remote systems before updating the local system.

Also, Any tutorial or website that can help me getting the basic concept related to above problem.
 
Have a look over at the codeproject.org for some neat tutorials on HTTP-Connections and Client/Server-Applications, I believe there are a half dozen or so articles about it for .NET.

To answer your question, yes, you can, all you need to do is listening on one port (preferable one of the higher range) and accept incoming connections if they meet some conditions.
 
Back
Top