Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.
I have created a Quiz windows application on VS2008 which runs mainly with the help of sql database. How do I install it on a lan . How to make connection between server and client machine to transfer and access database between server and client. Please give me suggestion on it.
Thank You in advance.

What I have tried:

I have installed server app in one server machine and client app in other machines on lan. I have given same connection string for both client and server application ie data source=servername\sqlexpress, so that all the data are stored in server machine. But data are stored in server machine but it does not pass to the client machine.
Posted
Updated 5-Jan-18 8:45am
v2
Comments
Perić Željko 7-Jan-18 5:42am    
Here is a link to excellent article about connection string, I think that it will solve some of the many problems :

https://www.codeproject.com/Tips/1198443/Simple-SQL-Connection-String-Creation

Assuming you have SQL Server or MySql installed on the LAN, and your database has been added to the server, it should be just a case of providing your software with the correct connection string to access the Server, just as you had to when you were developing the app on your development machine.
Hopefully, you have written your app carefully, and your connection string is stored in a configuration or settings file rather than hardcoded into your application, and if so it should be simple enough to change the string.

What string should you use? I don't know - we don't have access to the network, much less the Server instance, so we can't be specific.
This may help though: Simple SQL Connection String Creation[^]
 
Share this answer
 
First you will need to configure SQL Server to use TCP connections (default port 1433), see instructions here: Configure a Server to Listen on a Specific TCP Port | Microsoft Docs[^]
Here is an article to get you started: Beginners guide to accessing SQL Server through C#[^]
You also might be interested in the System.Data.SqlClient examples here: [Dotnetperls]
 
Share this answer
 
v2

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