Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
I am developing windows application.Client wants it to work online (if internet connection is available)and offline(if no internet connection) .offline Data Should Update For online Database (if internet connection is available)How do I Do it.
I'm Using c# and SQL 2008R2 Please help me .it's very urgent for me..
Posted
Comments
BillWoodruff 15-Oct-15 2:32am    
What have you tried so far ? Show your code. Ask specific questions.

Hi,

Just keep it your database in a server. Develop your client application with local database and you what you want. Followings are the references.

1. To check the internet connection - Testing Internet Connectivity.

2. Connection string for the database deployed in the server,
C#
Data Source=ipadress\SQLEXPRESS;Network Library=DBMSSOCN;Initial Catalog=databasename;User ID=sa;Password=password
, by this you can connect your database when the internet connection available, then you can do all the database operations with this connection.
Note:
Before all, SQL server in remote server needs to setup to allow remote connections.
Refer below links to setup SQL server,
1. How to enable remote connections in SQL Server 2008?
2. How do I configure SQL Server Express to allow remote tcp/ip connections on port 1433?
 
Share this answer
 
Comments
manojadee 15-Oct-15 2:40am    
Thanks for your respond,
How to Transfer local server data to Hosting Server.I have no experience with Hosting Server.
VR Karthikeyan 15-Oct-15 7:07am    
Refer Solution 2
Prepare database on client pc (Use same structure as on server) and use that database only for transactions with application. and sync that offline data to online data on time interval.
For that you can create and windows service or sql jobs or even yo can use sql sync algorithm which executes on time interval.
 
Share this answer
 

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