Click here to Skip to main content
15,445,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all
Is it possible to create a windows application (by C#) with web access to database (sql server)?
Actually I want to have several windows application programs with shared database.
Please help me. :(
Updated 14-Apr-21 14:57pm
fjdiewornncalwe 25-Dec-10 21:35pm    
If your SQL server is directly exposed to the web then you have bigger problems than just trying to create an app to hit it. Sandeep's answer is correct as an implementation like this should consist of the client side windows application which consumes webservices on your server which in turn have access to a protected database environment.

1 solution


What you are looking for is a Web Service.
Create a webservice which would be hosted on a webserver. Reference it in your windows application. Thus, several win apps can talk to the databases via webservice.
Share this answer
thatraja 25-Dec-10 2:18am     CRLF
[Comment from OP moved from answer] Thank you But I want to know Is there another way to do this? like directly connecting to database by setting IP address of server in connection string. If it is possible, what is the difference between this ways? Which way is better? Using this ways can effect on the speed of program or not? If it causes speed down, Is it better to use Web Application instead of Windows Application?

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