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,
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?