Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,
I got one task from my Client (i.e) Creating Windows Application using C# & SQL Using Two SQL Servers one has Local Server and Another One is WEB Server...The Entries will be directly Stored in LOcal Server Only(bcoz Some times have Internet Connection Problem)...Now what can i do Mean, How can i update recodrs(Daily Entry Records Only) from local server to Webserver table (Daily Update or Hours Based Update)..
If u have any idea about Automatic update Process is More Better...Thanks in Advance.....
Posted
Comments
[no name] 3-Aug-13 14:38pm    
http://msdn.microsoft.com/library/bb726002%28v=SQL.110%29.aspx
MichealRay 5-Aug-13 4:56am    
Thank You ThePhantoomUpvoter..Is this possible to Update using Linked Server...Is there any DrawBacks...

1 solution

If the databases are true copy in local and web server you can synchronize them as per comment provided by "ThePhantoomUpvoter" in the question above else, you may need to run a timer that runs at a regular interval and update the data from local server to web server.

To simplify things, you can add a "isWebUpdated" field in your local DB and set it to Zero at every insert. Once the data is updated to web server, update this field to 1.
 
Share this answer
 
Comments
MichealRay 5-Aug-13 4:58am    
Thank u for ur kind Reply..May i know how can u update using Timer...Can u elaborately tel the Concept...
Nitesh Kejriwal 5-Aug-13 5:37am    
You can run a timer in your local application that will call a function.
This function will read DB to get all unposted records and post them to web server. Once a record is posted, you update the local record as posted. Hope this makes sense!
MichealRay 12-Aug-13 9:34am    
thats y am asking how can i Update..Using C# to get and Update or SQL itself...can u define clearly or u have any demo link is good..
Nitesh Kejriwal 14-Aug-13 9:05am    
I already answered this. You need to run a timer that runs at a regular interval and update the data from local server to web server. For this, you need to add a "isWebUpdated" field in your local DB against each record you want to update to web server and set it to Zero at every insert. Once the data is updated to web server, update this field to 1.

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