Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I'm working on a visual studio wpf project that would be used by several users.
I want every user that installs the software to have a local database connected to an online database (hosted)... for this purpose I decided to go with sql server merge replication.
My question is; in order to add the database to the application is it best to:

1. configure my database schema and merge in sql server management studio and connect it to the application directly;(a database will be created if it doesn't exist)

2.configure my database schema and merge in sql server management studio then detach my database from my server and add the MDF file to the application files and include it in the setup;

Also; just checking; merge relication doesn't accept the server on the web as a publisher so in this case I need to make every user of the application a publisher and the web server a subscriber.. Am I correct here or am I missing something?

What I have tried:

I know it's a basic question but I was wondering if the merge replication will work if i use the second option
Posted
Updated 23-Dec-19 8:29am
Comments
[no name] 23-Dec-19 10:05am    
Neither "SQL management studio" nor "merge replication" is fundamental to where you are in your project. Start with "what is a database". Local versus remote. Access methods.

1 solution

I'm afraid this is not a "basic question", database replication is a difficult subject.

Here is an interesting article: Database Synchronization with the Microsoft Sync Framework -- Visual Studio Magazine[^]

And maybe you can learn something from this discussion about working with an offline database: c# - Desktop application which can work offline when no connectivity with SQL Server - Stack Overflow[^]
 
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