Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

Now i have some problem while connect two databases. Here one is Server and other DB is Client. All process going at client and stored Client_DB, Meanwhile that data is stored in Server_DB. My application more than 10 clients. So the Server_DB stored all Clients_DB information as well as identify each Client.. Here am using SQL Server 2005 Management studio.

In my above problem, i dont know the single tip. here my question is 1.How connect two databases 2.How transfer data from client to Server 3.How the server identify who is client(Clent1,Client2...Client10).

Thanks in Advance

Dhinesh Kumar.V
Posted
Updated 28-Jun-12 2:02am
v2
Comments
Jαved 28-Jun-12 7:59am    
so what is the problem?
thenestedloop 28-Jun-12 8:01am    
I do not really understand what your problem is. Could you provide more details about your actual needs and what you have tried so far?
Thanks.
Rahul Rajat Singh 28-Jun-12 8:13am    
please elaborate the problem.
Dhinesh kumar.V 28-Jun-12 9:36am    
sure sir. For example An supermarket(Server_DB) which is located at Delhi. And their branch(Client_DB) located at Mumbai,Kol,Bangalore,Chennai,etc. All branches have some different databases. And these are stored at Server_DB(Delhi). Here how can we connect Client and server databases and That Server how identify the clent from where..

Thanks in Advance

create two different connections to the two databases, and query them both.
 
Share this answer
 
Comments
Dhinesh kumar.V 28-Jun-12 8:08am    
ok Very thanks. but the server how can identify this data came from client1, or client10..
Jαved 29-Jun-12 7:05am    
Hi Dhinesh,
Sorry for late reply. You can store the client IP/ Name to identify.
Here you may have to look at the design of your application.
As what I have understood from your question is that, You have client and a server.
there are some data which will be generated at clientside and which will be stored in clientside database at the same time the same data will get stored at serverside database.

Here you can create two different connection string one for local database and one for remote database. and use accordingly.
And to identify client, you may need to pass some unique value(GUID) which can identify your client along with the data that you store in server database. Create one extra table which can store the client id and store that data row id in every data that you store at server side.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900