Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am devloping c# win app
and i want to create database in lan server machine running with server 2008 os
and this databse get datas from multyple client machine.
can some one explain which topics of c# i must lern to do this task.
i can understand local database.
but i am confuse with server client and how to create database in server and connect server and client with app and database.

i am newbe in c#.

thanx for helping in advance

What I have tried:

nothing yet tried.
because i cant understand where to find connection string and how to connect
Posted
Updated 19-Jun-16 4:41am
Comments
BillWoodruff 19-Jun-16 10:27am    
You need to start doing basic research: search CodeProject and StackOverFlow for content on "C# client server"
Member 12592153 19-Jun-16 14:16pm    
i reserch a lot but i get result on web app, but i am devloping win app
so i am little bit confuse and i cant find starting point.

1 solution

The actual database access is pretty much identical to how you do the local database, the only difference is that you use SqlConnection, SqlCommand, SqlDataAdapter, and so forth objects instead of the SqLiteConnection, or OleDbConnection and so forth you have been using.
The connection string is difficult: we can't tell you what to use as every installation can be different. But...talk to whoever installed your SQL Server installation and they will either give you a connection string or tell you what the details are: Server name and login details. Then you can build a connection string from them.
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 
Comments
Member 12592153 19-Jun-16 11:18am    
thanx for detail .
but still can u explain me which database i installe in server ?
i have full access to server can u please explain how to find connection string of server ?
OriginalGriff 19-Jun-16 11:33am    
Go here:
https://www.microsoft.com/en-gb/server-cloud/products/sql-server-editions/sql-server-express.aspx
But don't expect it to be a trivial job to install - you have to make important decisions during the installation process, and they will affect the eventual connection string.
I would strongly suggest you google for a few installation guides and read them very carefully before you proceed.
Member 12592153 19-Jun-16 13:52pm    
thank you very very much for your help
this is very important to me.
thanx again OriginalGriff :)
OriginalGriff 19-Jun-16 14:00pm    
You're welcome!

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