Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to run a C# and SQL server database program on a clients pc. Is there any way that the program can use to connect to its .bak file located to where the .exe file is of the program

What I have tried:

Its actually my first time doing something like this
Posted
Updated 14-Apr-21 6:18am

SQL Server needs to be installed on a server on the client's network, and the .bak file restored to it.

Your application then connects to that instance of SQL Server, so that all users see the same data.
 
Share this answer
 
Comments
Martin Harawa 14-Apr-21 10:53am    
On sqlconnection string what should i use
Richard Deeming 14-Apr-21 10:58am    
Depends on how the SQL Server instance is set up, and how you want to connect:
Microsoft SqlClient Data Provider for SQL Server Connection Strings - ConnectionStrings.com[^]
Take a look at this sql-server-tutorial[^]

As Richard pointed out SQL Server is usually not installed on a Client PC, but it is possible nevertheless to have a standalone combined Client / Server installation.
I would not recommend SQL Server for beginners as it is quite complicated, if your needs are simple see: best-databases-for-a-small-net-application[^]
 
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